Mr Pantami, who is also an Islamic cleric, in the video burst into tears after he read a verse of the Holy Quran.
“That is the Garden we shall give as their own to those of our servants who were devout,” read the reciter from Surah Maryam, Verse 63.
In response, Pantami sobbed, “O Allah! Make me one of them. O Allah! Make me one of them!”
Mrs Buhari captioned the video, “A chire tsoro a yi abinda ya dace”, which is translated to English as “Be courageous to do the right thing”.
It was not immediately clear what her intention was in uploading the video. Many on social media have, however, interpreted it as the first lady attacking Pantami.
Last month, Pantami joined the first family whose son Yusuf married Zahra Bayero at Bichi town in Kano.
The minister had in April faced calls for resignation over his past comments on terrorism. He once declared that he was always happy when infidels were massacred.
Many Nigerians on social media said they believed the minister could not be trusted with public data, especially with the National Identification Number and Subscriber Identity Module integration exercise under his watch.
Pantami later apologised, saying he had become more mature on religious matters and that he made the radical comments while in the university.