Security was tight in the capital, Honiara, for the vote on Thursday, with police and international security forces keeping the public away from the parliament building.
Sikua defeated Sogavare's deputy, Patteson Oti, with 32 votes to 15.
Sikua's victory is likely to ease tensions between the Solomon Islands and its key donors, Australia and New Zealand, which have led an international police and military intervention to maintain law and order in the troubled country and save it from bankruptcy.
Sogavare had been a strong critic of the intervention, known as the Regional Assistance Mission to Solomon Islands, accusing Australian police and government advisers of meddling in his country's affairs.
Sogavare also infuriated Canberra by appointing Australian citizen Julian Moti, wanted in Australia on child sex charges, as Solomons attorney-general.
Sikua, a former bureaucrat and education minister who defected from Sogavare's government last month, had signalled he would send Moti to Australia to face trial.
Sogavare became prime minister in May 2006 in the aftermath of riots the previous month which destroyed mainly Chinese-owned businesses in Honiara after Snyder Rini was elected prime minister. Rini was later forced to step down.
The Solomon Islands is a nation of about 500,000 mainly Melanesian people, spread across hundreds of islands, which gained independence from Britain in 1978.