created element with ajax ,not act autocomplete
Try this.

$form['azlocation'] = array( 
'#type' =&gt; 'select',
'#title' =&gt; 'location',
'#options' =&gt; array(1, 2, 3),
'#default_value' =&gt; 1,
'#description' =&gt; t('select your news location.'),
'#ajax' =&gt; array(
  'event' =&gt; 'change',
  'callback' =&gt; 'country_select_f',
  //'path' =&gt;'roadtonowhere',
  'wrapper' =&gt; 'city-term',
  'method' =&gt; 'replace',
  'effect' =&gt; 'fade',
 ),
 );
 $form['field_terms_city'] = array(
 '#type' =&gt; 'textfield',
 '#title' =&gt; t('select city (optional)'),
 '#prefix' =&gt; '&lt;div id="city-term"&gt;',
 '#suffix' =&gt; '&lt;/div&gt;',
 );
 return $form;
}
function country_select_f($form, $form_state){
   $form['field_terms_city']['#autocomplete_path'] = 'user/autocomplete';
   return $form['field_terms_city'];
}