The Democrat Party had argued that the poll violated the constitution for several reasons, including that it was not completed in one day.
The government blamed the delay on the opposition blocking polling stations.
Thailand has been in a political crisis since mass anti-government protests kicked off in November.
They were sparked by a controversial amnesty bill which critics said would allow former leader Thaksin Shinawatra to return to Thailand without serving time in jail for his corruption conviction.
By Jonathan HeadBBC News, Bangkok
It is not easy to fathom the reasoning behind a constitutional court that once sacked a prime minister for appearing on a TV cooking programme, and which recently stated Thailand was not ready for high-speed rail while it still had unsealed roads.
But this important institution, created to check the power of elected governments, has played a central role in recent Thai history.   Almost all its major rulings have been unfavourable to the ruling Pheu Thai party and its overlord, Thaksin Shinawatra.
Leaders of the opposition Democrat party told me they were confident the election, certain to be won by Pheu Thai, would be annulled by the court. So the rejection of their petition must have come as a surprise.
But the top courts are sure to be called on again to challenge the governing party's legitimacy. And another notionally independent institution, the Election Commission, is infuriating the government by its clear reluctance to restage voting in areas disrupted by anti-government protesters. The result is a prolonged political vacuum that almost invites judicial intervention.
The demonstrators have since called for the government of Prime Minister Yingluck Shinawatra, Thaksin's sister, to make way for an interim replacement that will bring in anti-corruption reforms.
Ms Shinawatra had called the election in the hope of defusing the crisis.
But the Democrats refused to contest the election - which they were almost certain to lose - arguing that reform of Thailand's political system must come first.
The government was understandably nervous about this ruling, the BBC's South East Asia correspondent Jonathan Head reports from Bangkok.
The constitutional court annulled a previous election seven years ago for seemingly trifling irregularities, he says.
It has also twice dissolved previous incarnations of the ruling Pheu Thai party and twice forced prime ministers from office.
This time though, the court dismissed the petition saying there was no credible evidence that the election had violated the constitution.
It also rejected a request by the Pheu Thai party to find the Democrat Party's behaviour toward the election unconstitutional.
The opposition movement has not exhausted legal avenues for blocking the government, our correspondent says.
Crisis explained in 60 seconds
The battle for Thailand's soul
In pictures: Thailand votes
Q&A: Thailand protests
They are still hoping an official corruption investigation into Ms Yingluck and other ministers will prevent her from forming a new government.
Wiratana Kalayasiri, a former opposition lawmaker and head of the Democrat Party's legal team, who brought the opposition petition to court, said: "This case is over".
"But if the government does anything wrong again, we will make another complaint," he told the AFP news agency.
Millions were prevented from voting because anti-government protesters forced the closure of hundreds of polling stations in Bangkok and in the south on election day.
It means the results of the election cannot be announced until special polls have been held in the constituencies that missed out on the 2 February vote.
The Election Commission said on Tuesday that those elections will be held on 27 April.
However, no decision has yet been made on the 28 constituencies where no candidates stood in the election.
Thailand's constitutional court has rejected an opposition request to annul the 2 February election, citing insufficient grounds.