Defense officials said the rebel Liberation Tigers of Tamil Eelam (LTTE) carried out the suicide attack targeting Merchant Ship Ruhuna and Nimalawa in the north sea off Kankasanturai at 5: 10 a.m. (2340 GMT).
Navy spokesman D. K. P. Dassanayke said three LTTE suicide vessels have come for the attack.
"Navy sailors providing security onboard the targeted vessels have engaged machine gun fire at the approaching suicide boats effectively, and destroyed two of them before ramming on the ships, " Dassanayke said.
However, he added that one of the suicide boats exploded in close proximity to Merchant Ship Nimalawa causing a considerable damage to the ship's hull.
The spokesman said that the third suicide craft has been captured by navy boats and at least six rebels might have been killed in the attack.
The government said the two ships were carrying essential suppliers to the civilians living in war-affected areas in the north when they were attacked.
Government troops and the LTTE are battling in the north, with military leaders vowing to completely defeat the organization in the near future.
Just two more rebel strongholds in the north remain to be captured by the troops in their campaign.
Claiming discrimination at the hands of Sinhalese-dominated governments, the LTTE has been fighting for an independent Tamil home land in the north and east for more than two decades, resulting in the killing of more than 70,000 people.