Lose ability to use node load with an argument in ajax form submit
I ended up finding a solution to this. Essentially, instead of trying to load the arg(1) inside the mymodule_form_submit (because apparently you can't do that when the submit is triggered via ajax), I instead passed the node ID to the form submit through a hidden form field. See below:

function mymodule_form($form, &amp;$form_state) {
    $form = array();

    $form['node'] = array(
        '#type' =&gt; 'hidden',
        '#value' =&gt; arg(1),
    );

    $form['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; t('Submit'),
        '#ajax' =&gt; array(
            'callback' =&gt; 'mymodule_form',
        ),
    );

    return $form;
}


function mymodule_form_submit(&amp;$form, &amp;$form_state) {
    $node = node_load($form['node']['#value']);

    $query = db_merge('mydatabase')
    -&gt;key(array('nid' =&gt; $node-&gt;nid))
    -&gt;fields(array(
        'nid' =&gt; $node-&gt;nid,
        'column1' =&gt; 'value1',
    ))
    -&gt;execute();
}


And now it works just fine.