Ankara signed the agreement with the Libyan Government of National Accord (GNA) just weeks after concluding a controversial deal on maritime jurisdiction.
The north African country has been mired in chaos since a NATO-backed uprising ousted and killed dictator Moamer Kadhafi in 2011.
Military strongman Khalifa Haftar launched an offensive in April to seize Tripoli from fighters loyal to the UN-recognised GNA, led by Prime Minister Fayez al-Sarraj.
"The proposal has become law after approval," the parliament said via its official Twitter account. The maritime deal was ratified by lawmakers earlier this month.
Turkish President Recep Tayyip Erdogan has said Ankara is ready to send troops into Libya if requested by Tripoli but the current military agreement would not allow Turkish combatant forces to go to Libya.
But it would allow both sides to send military personnel and police to each others' countries for training and education purposes, senior Turkish officials say.
For the Turkish government to deploy combat troops to Libya would require a separate mandate from parliament, as it does to send forces to Iraq and Syria each year.
The latest Turkey-Libya memorandum of understanding also covers increased cooperation in the fields of intelligence, terrorism, the defence industry and migration.
Their close relationship comes despite calls from the Arab League, of which Libya is a member, to end cooperation with Turkey following the Turkish military operation against Syrian Kurdish forces in October.
Saudi Arabia, Egypt and the UAE support Hafta and they all have tense or limited relations with Turkey and another GNA backer, Qatar.
The GNA approved the deal on Thursday and the next day, Tripoli urged five "friendly countries" to implement military deals to help it repel Haftar's forces.
Sarraj sent letters to Algeria, Britain, Italy, Turkey and the United States.
Follow us Twitter and Instagram to stay connected