No-one was hurt as the marbles hit the security screen.
Later, Scotland Yard officers arrested him.
The major security breach took place from the House of Commons public gallery.
No-one was hurt as the marbles hit the security screen.
The screen, which police said was damaged by the incident, prevented the MPs from hearing what the protester was shouting as he was forced out of the public gallery by several Commons staff.
The man, believed to be in his 30s, insisted afterwards that he was not protesting and refused to say why he had thrown the marbles.
"That was not a protest," he said as he was led away by police.
"Last week I heard them say it was us and them, the elite and us. It's us versus them, that's all it is -- the elite and us," he added.
He was heard shouting "I'm an Englishman and you're all idiots" as he hurled the marbles against the screen, The Times reported.
He was arrested on suspicion of going equipped to cause criminal damage and under Section 5 of the Public Order Act.
Witnesses in the public gallery said the man was wearing a big, green combat jacket, a black tracksuit and had a glass eye in his right socket.
Parliamentary stewards said he must have smuggled the marbles into the viewing gallery in his underwear as members of the public have to go through airport-style security check to enter the Palace of Westminister -- the home of the British Parliament.
The last such incident took place in 2009 when a packet of purple powder was thrown from the MPs' guests gallery, which struck the then prime minister Tony Blair on the shoulder.
Shots fired inside Canadian parliament; PM Harper safe
Education is the best weapon against terrorism, says Malala
Modi to become first Indian PM to address Aus parliament
What's NSA Doval doing in Afghanistan?
IS terrorists behead taxi driver who "just wanted to help"