The Voice of America reported generals Atta Mohammed and Abdul-Rashid Dostum met Wednesday with the U.N. officials in the provincial capital Mazar-e Sharif.
Both commanders promised to obey Afghanistan's central government and cooperate to end fighting between their forces.
The militias commanded by Atta, an ethnic Tajik, and Dostum, an Uzbek, have battled each other for several weeks, leaving dozens dead.
Both commanders are under the authority of the Afghan armed forces, but have been accused of acting as semi-autonomous warlords, locked in a struggle for territory in northern Afghanistan.
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend
Biologists detail four new deep-sea 'killer sponges'