Sister vessels, the MV Helliar and MV Hildasay, operate on the lifeline routes from Aberdeen to Kirkwall, Orkney and Lerwick.
They had previously been chartered from Fortress, but a formal deal has been completed and they will now join the Caledonian Maritime Assets Ltd (CMAL) fleet.
Minister for Energy, Connectivity and the Islands, Paul Wheelhouse, said: “Our ferry services are iconic transport links that play a vital role for our island economies, so it’s important that we secure the two freight ferries for the future.
“Purchasing the vessels outright will also bring financial benefits by delivering savings to the public purse over the longer term.
“Making sure these lifeline transport links continue to support the communities and businesses they serve and deliver best value for taxpayer’s money remains at the heart of our ferry operations.”
Chief Executive of CMAL, Kevin Hobbs, said: “This deal secures the future of the freight ferries, strengthening lifeline ferry provision for Orkney and Shetland.
“It follows our purchase earlier in this financial year of three passenger vessels serving the Northern Isles, bringing the entire fleet of NorthLink ferries under our ownership.”