A 61-year-old man from New Hampshire walked into the headquarters of the Federal Reserve System yesterday with two guns, a package he said contained dynamite, and a desire to improve the nation's economy, D.C. police said.

The man entered the building at 21st Street and Constitution Avenue NW about 10:30 a.m. with a bag slung over the shoulder of his trench coat and told the guard he wanted to take photographs. After the guard asked him to wait for clearance, the man ran to the second floor, where the Federal Reserve Board was meeting.

Denied entrance to the meeting, he drew a .38-caliber revolver and sat outside the meeting room. When he placed the gun in a pocket, a guard pounced on the man and disarmed him. The man then said he had placed dynamite in the building, and employes were evacuated until a harmless package of wires and paper had been found and inspected.

Police said they arrested James Von Braunn of Lebanon, N.H., and charged him with burglary while armed.

In addition to the revolver, police said the man had on his person a sawed-off shotgun and a hunting knife.

Detectives said the man told them he wanted to take board members hostage to focus media attention on the board's responsibility for high interest rates and the nation's economic difficulties.