Sandakan deputy police chief Supt Fadzil Mohd Ali said Sgt Mohd Hanif Patahur, 31, who was the team leader, and Private Ahmad Feleni Mansor, 23, died at the scene.
He identified the four who sustained minor injuries as the driver of the APC Mohd Faizal Ahmad, 29, Mohd Amaruddin Che Soh, 29, Mohamad Haffez Khairudin, 24, and Ifaiznor Ismail, 29.
In the 11.15am incident, the APC with the six soldiers on board and another APC were on their way back to the Sri Kinabatangan Camp of the Royal Malay Regiment here, he told Bernama.
He said the four injured soldiers were sent to the Sandakan Duchess of Kent Hospital for treatment.
He said the two APCs were on their way back to the camp from Kampung Sungai Tiram when the APC driven by Mohd Faizal went out of control and overturned.
The two APCs had been on security patrol in Teluk Labuk earlier, he added.
The soldiers involved had been on duty at the Sri Kinabatangan Camp since July 15 after being posted there from Kunatan, he said.
He added that the bodies of the two victims would be sent back to their hometowns tomorrow.
Hanif was from Johor while Ahmad Fikri from Kelantan.