"MP Lars Aslan Rasmussen has been denied entry into Bahrain," Danish undersecretary for consular affairs, Rene Dinesen, said in a statement.
Aslan Rasmussen was still at Bahrain International Airport early afternoon waiting to leave the country, according to the Danish foreign ministry.
Accompanied by Brian Dooley, an Irish activist at the Gulf Center for Human Rights (GCHR), Aslan Rasmussen was seeking to protest against the detention of Danish-Bahraini citizen Abdulhadi al-Khawaja, who in 2011 was sentenced to life for conspiring against the nation's Sunni monarchy in the wake of majority Shiite protests.
"The dictatorship in Bahrain has held me for five hours now and the police have taken my passport," Aslan Rasmussen tweeted on Wednesday.
"It's obviously too dangerous for a Danish MP to visit another Danish citizen in prison. What are they hiding?" he added.
GCHR, which was founded by Khawaja, said Dooley was also denied entry into Bahrain, which Sunday hosts this season's second Formula One Grand Prix race.
In a Facebook post including a picture of himself and Dooley holding a photo of the activist with the inscription "Free Abdulhadi", Lars Rasmussen said the detainee was "seriously ill".
"We are here to pressure the authorities and to show that we will not forget Khawaja," he said.
The Danish foreign ministry said it was following the situation "closely and visiting him regularly in prison".
The small kingdom of Bahrain has since 2011 cracked down on Shia representatives demanding reforms and respect for human rights.
Human rights organisations repeatedly accuse the oil-rich Gulf country of suppressing all forms of opposition.