The man was caught attempting to smuggle an amount of heroin hidden inside his stomach, the ministry said in a statement carried by SPA state news agency.
He was executed in the city of Riyadh.
His beheading brings to 38 the number of people executed in Saudi Arabia since the beginning of the year, according to an AFP tally.
In 2012, the kingdom executed 76 people, according to an AFP tally based on official figures. Human Rights Watch has put the number at 69.