The Navy said that "the attack was repelled, resulting in the deaths of six people among the group of assailants".
The incident comes two months after six soldiers and a policewoman were killed when their helicopter was shot down by suspected cartel members.
Tamaulipas is at the centre of a turf war between rival drugs cartels.
None of the Marines on board the Black Hawk helicopter was hurt when it was hit by seven bullets.
The helicopter was searching for members of a drug cartel when it was fired on by gunmen about 70km (45 miles) south of Nuevo Laredo.
Nuevo Laredo is on the border with the United States and a main transit point for drugs smuggled from Mexico to the US.
In the incident on 1 May, suspected members of the Jalisco New Generation cartel fired a rocket-propelled grenade at a Cougar helicopter and forced it to make an emergency landing.
Seven members of the security forces were killed in the attack in western Jalisco state.
While attacks on the security forces are frequent in Mexico, officials said that the downing of the Cougar represented an escalation in tactics by the cartels.
A Mexican Navy helicopter came under fire in the violence-wracked northern state of Tamaulipas on Sunday.