Elmar Huseinov, founder and editor of the opposition magazine Monitor, was found dead on Wednesday in the lobby of his apartment, magazine journalist Eynulla Fatullayev said.
Police said seven shots were fired, with four hitting Huseinov in the heart and the side.
Tension between the government and the opposition in tightly controlled Azerbaijan has increased since the October 2003 election, in which Ilham Aliev replaced as president his father, longtime leader Geidar Aliev, in a vote the opposition said was marred by fraud.
Several opposition leaders, including newspaper editors, have been sentenced to prison over unrest that followed the election.
The Monitor has been published and sold privately since a decision forbidding the state printing and distribution company from selling it.
It was ordered closed twice. After the first order in 1998, it continued publishing under a slightly different name. It shut after the second order in 2002, but renewed publication after a change in media licensing legislation in 2002.
Huseinov went to jail in 2001 for six months after a successful libel suit by Baku's mayor. In November, a court ordered his property confiscated to pay a $20,000 fine connected with a 2003 lawsuit filed by the representative of Azerbaijan's Nakhichevan region.
Huseinov did not have sufficient property to cover the fine.