The victims were identified as Mansur Alam, 17, and Humayun Kabir, 14, residents of Membar Para in the upazila.
Abul Kalam, chairman of Alikadam Upazila, said a herd of wild elephants invaded the area at the dead of night.
Also read: Elderly man killed in Bandarban elephant attack
At one stage, a wild elephant swooped into a house in Membar Para and vandalised it.
Mansur and Humayun came under the attack of the elephant while trying to drive it away from the area.
Also read: Woman killed in elephant attack in Cox’s Bazar
An unidentified man was also injured in the attack by the elephant. He was taken to a local hospital.
Also read: JSD leader Kanak killed in elephant attack in India
Police recovered the bodies and sent those to local hospital morgue.
Also read: Moulvibazar youth killed in elephant attack
Also read: Farmer killed in Chattogram elephant attack