Zainab Aliyu was wrongly accused of carrying Tramadol to Saudi Arabia in 2018 and was detained awaiting execution.
Ms Aliyu was arrested at her hotel in Medina by Saudi police after arriving for hajj with her family.
She gained her freedom after the Nigerian government launched an investigation into her case.
Zainab Aliyu who was accused of smuggling 2,000 packs of Tramadol, strong painkiller was facing execution.
But investigations later found out that she was framed up after a criminal gang planted the drugs in her luggage.
Aliyu’s arrest and detention sparked protests across Nigeria with a social media hashtag #FreeZeinab initiated to secure her release.
The Nigerian government confirmed Zainab Aliyu’s release after a campaign for her freedom last month.
The National Drug Law Enforcement Agency of Nigeria (NDLEA) recently said it had uncovered a criminal gang that has resorted to planting illicit drugs in travellers’ luggage.
Ms Aliyu’s father reported the case to the police which triggered an investigation leading to the arrest arrest of six officials at Mallam Aminu Kano International Airport.
Oyoyo Zainab Aliyu 💃💃 Zainab ta dawo gida Najeriya Litinin da safe da misalin karfe 10. pic.twitter.com/I8uPVvcbwc
— BBC News Hausa (@bbchausa) May 13, 2019
Zainab Aliyu was only reunited with her family at the Kano International Airport two weeks after gaining her freedom.
Drug trafficking is an offence in Saudi Arabia with offenders usually executed when found guilty.
This month a Nigerian woman was among four people executed in Saudi Arabia for drug trafficking offence.
Local media in Saudi Arabia reported that three other men were also executed for the same offence.
Two Pakistani men, a Yemeni man and the Nigerian woman were all put to death in the holy city of Mecca.