Alexei Miller was born in St. Petersburg in 1962. He was educated at the Leningrad Institute for Finance and Economics, graduating in 1984 with a degree in economics. On graduation, he worked at the LenNIIproyekt architecture research institute.
In 1991, Miller joined the foreign-relations committee at St. Petersburg's mayor's office, which Vladimir Putin headed at that time. Miller was in charge of developing free-trade zones Pulkovo, where Coca-Cola and Gilette built their plants, and Parnas, site of Russia's No. 1 brewery, Baltika.
According to a report published in the Izvestiya newspaper, Miller contributed to Dresdner Bank and Credit Lyonnaise, opening St. Petersburg operations. He was also involved in the hotel business in St. Petersburg, holding the position of Grand Hotel Europe's chair of the board for some time, the Izvestiya report said.
Miller left the mayor's office in 1996, at the same time as Putin, when then-Mayor Anatoly Sobchak lost his re-election bid to the current holder of the office, Vladimir Yakovlev. Miller was made deputy director for development and investment at the St. Petersburg Sea Port, the biggest seaport in Russia's Northwest.
In 1999 and 2000, Miller was general director of the Baltic Pipeline System, a company in charge of the construction of a pipeline between the Timan-Pechiora oil-extraction site and a terminal at the Primorsk seaport in Leningrad Oblast. The company was fully owned by the Verkhevolzhsk Pipelines group, which, in turn, is a fully owned subsidiary of Transneft, Russia's monopoly pipeline operator. The decision to close down the Baltic Pipeline System and transfer the construction directly to the Verkhevolzhsk Pipelines group came in September 2000, a month after Miller was made Russia's deputy energy minister.
In his new position, Miller oversaw the Timan-Pechora pipeline construction as well as the construction of oil terminals at the Primorsk seaport.