The black-and-white image shows King Faisal, Saudi Arabia's third monarch, signing the United Nations Charter in 1945, with the diminutive Jedi master Yoda perched next to him.
Saudi Arabia scrambled last week to withdraw the textbook.
The government has sacked Mohammad Bin Atiyah al-Harithi, the deputy education minister for curricula, saying that new versions of the textbook are being printed after the "inadvertent error".
"Education Minister Ahmed al-Eissa to terminate the mandate of ... Harithi and all those responsible for reviewing and approving textbooks," the education ministry said in a statement Monday.
More From This Section
Shehri said he was surprised to see his photograph end up in the school textbook.
He told the New York Times that he paired King Faisal and Yoda as they were both intelligent and because Yoda's green skin and lightsaber match the green of the Saudi flag.
He stressed he had meant no offence to the king, seen widely as the architect of Saudi Arabia's modernisation.
The error prompted light-hearted banter on social media.