One of the gunmen was shot dead and police said they were looking for other two gunmen who were believed to be at large and dressed in military-style clothing.
At least 12 people were killed in the shooting, Washington DC Mayor Vincent Gray and Police chief Cathy Lanier said.
"We are confirming 12 fatalities. We had a few additional victims who were injured. They were not fatally injured," Lanier said.
"The first is for a white male between 40 and 50 years of age... Wearing military uniform consistent with a naval uniform and a beret style hat," she said. "We also have a lookout for a black male between the ages of 40 and 50 in an olive military style uniform."
Also Read
Earlier, Lanier told a news conference that one of the shooters was dead and authorities were searching for a white man and a black man.
"We have no information to believe that either of these folks are military personnel, but we do have information that those individuals are wearing military-style uniforms," she said.
Lanier said there is no indication of a possible motive at this time.
ABC News reported a gunman, identified as a 50-year-old Navy employee whose employment status had "recently changed", had died at the scene.
Speaking at the White House, President Barack Obama called for a seamless investigation by federal and local authorities and promised to bring those responsible for the attack to justice.
Hundreds of police and naval personnel surrounded the Naval Sea Systems Command headquarters, where about 3,000 service members, civilians and contractors work. The yard is located less than five kilometres from the White House.