EDIT: Do not miss the fantastic reply by /u/The_Alaskan below.
Russia had been anxious for years that Britain or the United States would someday end up seizing Alaska without paying anything. The Russian government probed both governments, but serious attempts to sell Alaska were suspended during the Civil War. Secretary of State William Seward was almost as anxious to buy as Russia was to sell. In 1860, he said this in a speech in Minnesota-
"I see the Russian, as he busily occupies himself in establishing seaports, and towns, and fortifications on the verge of this continent, as the outposts of St. Petersburg [then the Russian capital]; and I can say: "Go on, and build up your outposts all along the coast, up even to the Arctic Ocean; they will yet become the outposts of my own country - monuments of the civilization of the United States!"
But a vast new territory north of the Missouri Compromise line was impossible before the Civil War. In 1867, with the war behind and Republican governments installed in the South, Seward's path was clear.
Secretary Seward probed the Russian minister to the United States, Eduard de Stoeckl, who in turn forwarded the request to Russia's chancellor Alexander Gorchakov. They soon agreed on a sale.
Neither side was extremely worried about price. The final sum was determined with almost ridiculous speed, in a single overnight session between Seward and Stoeckl. The price was never considered on a "per acre" basis, but as a gesture which had to seem fair for a territory of that size while still remaining an obvious gesture of friendship from Russia to the United States. Stoeckl suggested $10 million, and Seward countered with $5 million ($167 million and $83.5 million in current dollars, respectively.) Stoeckl came back with $7.5 million, and Seward offered $7 million. Stoeckl mentioned the Russian Fur Company still had vast interests throughout the territory, so Seward tacked on another $200,000 so the Russian government could liquidate the company and include its assets as part of the sale. The two men shook on the price of $7.2 million and that was that.
Most of these details I took from Seward at Washington as Senator and Secretary of State, a book compiled by Seward's son Frederick W. Seward (who himself served in the State Department under his father).
EDIT: it's on Google Books.