Thursday's decision, announced by Sepp Blatter, the Fifa president, followed a bidding process involving 11 nations seeking a prize expected to bring a huge economic boost for the chosen hosts.
Both decisions were made following a secret ballot of football's world governing body, Fifa's 22 executive members in Zurich.
The vote by the executive committee of Fifa will spark huge cash investment by the successful nations, and bring them under intense scrutiny as the world watches to see if they can stand up to the challenge.
It is the first time that either Russia or Qatar has been chosen as host nation for the World Cup.
The Russian bid was picked ahead of England, Spain-Portugal and Holland-Belgium to host the 2018 event.
Russia has never hosted the tournament before, which fits with Fifa's preference for new territories following the success of Africa's first World Cup in 2010.
It has a vast budget and the backing of the government.
Russia's selection comes despite the absence of Vladimir Putin, the Russian prime miniser, from the vote in Switzerland.
Putin had been expected to be a prominent figurehead for the Russian bid in the final days of campaigning but instead remained in Moscow.
Qatar got the better of the United States, Australia, Japan and South Korea to stage in 2022.
Qatar has promised air-conditioned and eco-friendly stadiums to combat 50C summer heat, and the chance to see more than one match per day due to the small size of the country.
With few of the stadiums or transport links yet built, Fifa is said to have taken a leap of faith in choosing Qatar.
But with billions in oil and gas revenue available to spend, the attraction of a first World Cup in the Middle East has tilted the scales in its favour.