HP units in Poland and Mexico also resolved criminal charges related to contracts in those two countries, the department said.
The Securities and Exchange Commission entered into a related settlement with the computing giant over allegations that its subsidiaries made improper payments to government officials in order to obtain contracts, in violation of the Foreign Corrupt Practices Act.
HP's Russia subsidiary paid more than $2 million in bribes to obtain a contract with the federal prosecutor's office, the SEC said.
In Poland, an HP unit provided gifts and cash worth more than $600,000 to obtain contracts with a national police agency, it said.
And in Mexico, an HP subsidiary paid more than $1 million in inflated commission in order to seal a software deal with Mexico's state-owned petroleum company, the agency said.
On Wednesday, Polish prosecutors alleged that a local HP executive paid bribes worth over $500,000 in exchange for help winning contracts to supply computer equipment to Polish police headquarters.
"The misconduct described in the settlement was limited to a small number of people who are no longer employed by the company," John Schultz, HP's executive vice president and general counsel said in a statement on Wednesday.
"HP fully cooperated with both the Department of Justice and the Securities and Exchange Commission in the investigation of these matters and will continue to provide customers around the world with top quality products and services without interruption."
The Justice Department said it acknowledged "extensive anti-corruption remedial efforts" the company undertook, including disciplining culpable employees and improving the company's internal controls.