An "active shooter" was encountered on the base on Friday morning, according to the Escambia County sheriff's office.
A few minutes later, the shooter was dead, according to the sheriff's office and the Navy. WEAR TV, a local news channel, reported that sheriff's deputies at the base fatally shot the shooter.
Two other people were killed, the Navy said in a statement, without providing further details. Authorities planned a news conference for later on Friday morning.
The base remained on lockdown.
At least six injured people were expected at the trauma center of the Ascension Sacred Heart Hospital Pensacola, spokesman Mike Burke said.
Seven people were being treated at Baptist Hospital, WEAR TV reported.
U.S. President Donald Trump had been briefed and was monitoring the situation, a White House spokesman said.
On Wednesday, a sailor shot three civilians at the historic Pearl Harbor military base in Hawaii, killing two of them before taking his own life.
The Pensacola base, which is near Florida's border with Alabama, is a major training site for the Navy and home to its aerobatic flight demonstration squadron, the Blue Angels. The base employs more than about 16,000 military and 7,400 civilian personnel, according to the base's website.