The shootings took place late on Thursday near the Officer Candidate School at the Marine Corps Base in Quantico, and all three people who died were identified as Marines, Marines spokesman Sergeant Christopher Zahn said.
Zahn, who is based at Quantico, could give no details as to a motive for the shootings.
"The investigation is in the very early stages," he said.
"An isolated shooting incident has occurred at Officer Candidate School, Quantico," the base separately said on its Facebook page. "The suspect has been barricaded by law enforcement personnel."
The Facebook message told base residents to remain in their homes with their doors locked, until the lockdown was lifted early on Friday.
The Marines did not name the service members who died, pending notification of their families. ABC News quoted a military official as saying the suspect had been identified as a staff member at the cadet school, as was one of the victims.
ABC also said that the second person killed was a female Marine found dead in the barracks, but gave no further details.
The shooting, which ABC News reported took place in a barracks near the school, came days after seven U.S. Marines were killed in a mortar explosion at an Army munitions depot in Nevada during a live-fire training exercise.