One of the aircraft clipped the rotor of the other before the two crashed into the ground, footage published on local media showed.
The incident took place at 09:30 local time (02:30 BST) in the Malaysian town of Lumut, which is home to a Royal Malaysian Navy base.
There are no known survivors.
The state’s fire and rescue department said it was alerted to the incident at 09:50 local time (01:50 GMT). Malaysia’s Prime Minister Anwar Ibrahim said in a post on X, formerly known as Twitter, that “the nation mourns the heart-wrenching and soul-wrenching tragedy”.
“Condolences to all the families of the victims and prayers for strength to face this calamity,” he said.
In March, a Malaysian coast guard helicopter crashed into the sea off Malaysia’s Angsa Island during a training flight.
The pilot, co-pilot and two passengers on board were found and rescued by fishermen.