A man shot himself to death as he stood near the fence along the north side of the White House, the Secret Service said.
President Donald Trump and first lady Melania Trump were in Florida at the time.
The man was identified by the Secret Service and the city's Metropolitan Police Department, but his name was not immediately released so authorities could notify his relatives.
The incident began at about 11:46 am (local time) on Saturday when the man approaches the fence, "removed a concealed handgun and fired several rounds, none of which appear at this time to have been directed towards the White House," Mason F. Brayman, an assistant special agent in charge for the Secret Service, said in a statement.
No one else was injured.
The White House said earlier it was of the situation and that Trump was briefed.
The police department will take the lead in the investigation.