A female aid worker was also missing while one other sustained injuries in the attack.
The President condemned the attack by the insurgents on Friday in a statement by his Special Adviser on Media and Publicity, Femi Adesina.
He said: "As I have always maintained, no true religion advocates hurting the innocent".
"We strongly condemn this attack on selfless aid professionals, who were working in the most hard humanitarian conditions".
The medical charity Medecins Sans Frontieres said on Friday it had suspended its work in the Nigerian town of Rann and evacuated national and worldwide staff after a deadly raid.
Samantha Newport, Head of Communications, UNICEF Office for Coordination of Humanitarian Affairs (OCHA), revealed this in Borno on Friday.More news: HolI Festival 2018: Google marks Festival of Colour with dramatic doodle
Boko Haram has regularly attacked such camps with gunmen and suicide bombers.
The attackers were not immediately identified.
"We extend our deepest condolences to the families of the victims, and to every family whose loved ones have been affected by this and other terrorist acts".
The attack resulted in the death of two aid workers and a medical doctor who worked in a nearby camp hosting about 55,000 internally displaced persons.
No details were immediately available for the fourth, but Newport said the injured and missing were both women.
Edward Kallon, the U.N. Humanitarian coordinator in Nigeria, had called on the authorities to ensure the perpetrators "are brought to justice".