Transport Minister Humza Yousaf said a  new charter arrangement would end the long-running row over seafarers' pay.
The RMT union had claimed some workers on board two freight boats were paid less than Â£4 an hour.
The charter change will see contracted out services return to operator Serco Northlink from next month.
The freight vessels Hellier and Hildasay have been operated by Seatruck, which is contracted to run the service by Serco Northlink.
Seatruck argued the national minimum wage was not applicable to the crew, many of whom are non-UK residents.
Serco Northlink said it had repeatedly offered to bridge the pay gap and backdate it, but Seatruck declined to accept.
Mr Yousaf said the new arrangements would come into force early next month subject to some financial and regulatory details being finalised.
He said: "I'm very pleased to see an agreement in principle now in place to end this long running issue around the freight vessels serving the Northern Isles.
"The new charter basis will allow the wage issue to be resolved. Going forward, I can confirm that all crew members will be paid at least the minimum wage."
Serco Northlink was awarded the six-year Â£243m Northern Isles contract in 2012.
It operates three ferries and two cargo boats to the Northern Isles on a route which is heavily subsidised by the Scottish government.
An agreement has been reached to ensure foreign workers on freight boats serving Orkney and Shetland are paid at least the minimum wage.