It said the man approached the White House's fence on Pennsylvania Avenue just before noon local time (17:00GMT) before taking out a handgun and firing several shots.
No one else was injured, according to police.
President Donald Trump is not at the White House, but at his Mar-a-Lago estate in Florida.
The man was in a large crowd when he fired the gun, the Washington Post reports, citing witnesses.
A video posted to Twitter shows many people running away from the scene.
The man's name has not been released.
There have been a number of security incidents at the White House in recent years.
Most recently, on 23 February, a car drove into a security barrier outside the building.
A 35-year-old woman was detained.
In March last year a man armed with pepper spray spent more than 16 minutes inside the grounds after jumping the fence.