The attack, which a medical source said wounded a total of 18 people, came as a Libyan jet shot down a militia helicopter after Islamist-led fighters launched strikes on the eastern Al-Sidra oil terminal.
The car bomb struck near the back gate of the Dar al-Salam Hotel in the eastern city of Tobruk, where the parliament elected in June took refuge after Islamist-led militias seized control of Tripoli in August.
Farj Buhashem, a spokesman for the legislature, said parliament was meeting on the ground floor when the blast went off.
"There was broken glass and some pedestrians were injured," he said.
Lawmaker Tareq Jarushi, speaking to AFP by telephone from Tobruk, said that the blast was caused by a suicide bomber who rammed his car into the back gate.
"Witnesses saw a car painted in military colours ramming the back gate and then explode," said Jarushi.
Jarushi, who is the son of air force chief Brigadier General Saqr Jarushi, said body parts had been found at the scene of the bombing, "indicating that this was a suicide attack."
Three lawmakers who were outside the building at the time were slightly wounded by shattered glass, he said.
A source at a Tobruk hospital said 18 people were treated for minor wounds and later released.
The attack comes as the UN mission to Libya, UNSMIL, plans a new round of peace talks between warring factions aimed at ending months of violence and political deadlock in the North African nation.
UNSMIL deplored what it called the despicable attack, urging all sides "to desist from violence and to seek to resolve their political and security crises through dialogue".
An EU statement said the violence "can only bring further suffering to the Libyan people," adding that the European Union is prepared to impose previously adopted UN sanctions on those fuelling the violence.
More than three years after dictator Moamer Kadhafi was toppled and killed in a NATO-backed revolt, the country remains awash with weapons and powerful militias, and has rival governments and parliaments.
The UN-brokered talks are set to take place on January 5, diplomats at the UN Security Council said last week.
But Libya's internationally recognised parliament voted Monday not to attend the negotiations if the rival legislature in Tripoli is party to the talks, according to lawmaker Abdulsalam Nassiyeh.
Signup to our newsletter and follow us on Facebook and Twitter!
The suicide bombing came as militia aircraft, including a helicopter, attacked pro-government forces in the so-called "oil crescent" eastern region around Al-Sidra oil terminal, said military spokesman Ali al-Hassi.
"The air force shot down the helicopter as it prepared to land at a military base near Sirte airport, after it had taken part with other aircraft in the air raids," Hassi said.
There were no immediate reports of casualties.
Fighters from the Islamist-led Fajr Libya (Libya Dawn) coalition of militias, which controls much of Tripoli, as well as second and third cities Benghazi and Misrata, have been trying to seize Al-Sidra and nearby Ras Lanuf terminals.
They launched a surprise attack by speedboat on Thursday in which 22 soldiers in the Al-Sidra area were killed.
Seven oil tanks at Al-Sidra were set on fire as a result of the fighting. On Sunday, firefighters managed to extinguish the blazes at four of them and put out another fire on Monday.
There are 19 tanks at Al-Sidra, and two of them are still ablaze, raising concern that if the fires are not brought under control they could spread and disrupt Libya's key oil industry.
On Monday, Libya's internationally recognised government approved a $6 million (4.9 million euro) deal with a US firm that will send experts to extinguish the fires, a statement said.
Libya's oil production has dropped to less than 350,000 barrels per day since clashes first erupted around the export terminals on December 13, from 800,000 previously, industry experts say.
The fighting has alarmed investors, who are concerned about possible disruptions.
On Sunday, pro-government forces raided the militia-held city of Misrata, after a Fajr Libya launched a new assault on Al-Sidra.
The UN mission in Libya has denounced both the assault on Al-Sidra and the strikes on Misrata.