How to enable menu link when creating a new node?
You'll need to create the menu item separately, using menu_link_save

$item = array(
  'menu_name' =&gt; 'main-menu',
  'link_title' =&gt; $node-&gt;title,
  'link_path' =&gt; 'node/'. $node-&gt;nid,
);
menu_link_save($item);