"We announce to you to the good news of the expansion of the caliphate to West Africa because the caliph... has accepted the allegiance of our brothers of the Sunni group for preaching and the jihad," said IS spokesman Abu Mohammed al-Adnani in the message released over social media in Arabic.
IS's media group, the Al-Furqan Media Foundation, has taken responsibility for the message.
Boko Haram had made their first offer of allegiance to IS over the weekend in an audio statement on 7 March.
The message, which was circulated on Boko Haram's Twitter account, was believed to be from the group's leader, Abubakar Shekau.
"We announce our allegiance to the Caliph of the Muslims Ibrahim ibn Awad ibn Ibrahim al-Husseini al-Qurashi and will hear and obey in times of difficulty and prosperity," read the message.