The 24-year-old international, who has been capped 15 times, has spent the last two seasons with United Arab Emirates side Al Sharjah, and joins the Pamplona outfit on a free transfer.
"I am so glad to join Osasuna and I will try to be a worthy player for this team. I will have to pave the way for other Iranian players to join La Liga," Masoud Shojaei told the Iranian media.
Shojaei, an attacking midfielder, is looking forward to linking up with compatriot Javad Nekounam.
"I was one of the best players in the UAE and want to be the best in Spain alongside my team-mate Javad Nekounam. I will undoubtedly learn more from him. We can strengthen Osasuna's midfield together," he added.