Ai and Mao are the latest of dozens of activists whose movements have been restricted by Chinese authorities ahead of next week's Nobel Peace Prize award ceremony for jailed dissident Liu Xiaobo.
"I had passed customs and was stopped at the boarding gate," Ai told DPA, adding that it was the first time authorities had prevented him from leaving China.
Ai said he had planned to take a flight from Beijing's Capital International Airport to South Korea Thursday and later travel on to Germany, Ukraine and Denmark.He said his itinerary was "fixed" and he had no plans to visit Oslo, where the Nobel ceremony was scheduled for Dec 10.
"They didn't tell me the reason," Ai said of his removal from the departure gate.
"Only after I questioned them, they said my leaving may 'endanger the security of China'," he said."By doing this, it proves the seriousness of human rights and legal problems in China," Ai said.
Mao said he was detained at the same airport Thursday afternoon as he was about to fly to Singapore for a conference.
"They told me I was a dangerous element," Mao told the US broadcaster Radio Free Asia.
He said the police "didn't know the reason" for stopping him from leaving China.
"They were just carrying out orders from higher up," Mao was quoted as saying.
He said he believed it was "probably connected" to next week's award ceremony for Liu, who is serving an 11-year sentence for subversion.
In an open letter in late October, Liu's wife, Liu Xia, invited Mao and 140 other leading dissidents, lawyers and rights activists to attend the award ceremony.
Police have prevented several other members of the group from leaving China while most of the others are under close surveillance or house arrest.Liu Xia has also been held under house arrest since the Oct 8 announcement of the Nobel prize, which angered China.
Ai, 53, has become increasingly active in China's human rights movement in recent years.
Last month, police held him under house arrest to prevent him from staging a feast in Shanghai that was designed to poke fun at the ruling Communist Party.
Liu Xiaobo, a prominent writer and one of China's leading dissidents, was sentenced to 11 years in prison in December for his part in writing Charter '08 for democratic reform