The two buildings on Al-Jumhuriya Avenue are close to the residence of leader Muammar Gaddafi, in an area where two explosions were heard at around 1.30am on Tuesday (1130 GMT).
By 3am firefighters were battling to control flames that were tearing through the two facing buildings, according to an AFP correspondent brought to the area by Libyan authorities.
The head of Libya's Ministry for Inspection and Popular Control, the anti-corruption agency, was at the scene and said that some ministry employees had been injured, but provided no further details.
Government spokesman Mussa Ibrahim later said that the rebel National Transitional Council (NTC), based in eastern city of Benghazi, had directed NATO to attack the agency in a bid to destroy files related to former regime officials who have joined the rebellion.
"We believe that NATO has been misled to destroy files on their corruption cases," he told reporters.
Three explosions had also been heard earlier in the same area.