Cruz, 41, a former state solicitor general who has never held elected office, is the third insurgent Republican this year to defeat an establishment Republican in a U.S. Senate primary.
Dewhurst, 66, a wealthy businessman who had the support of top Texas Republicans, including Governor Rick Perry, started the race as the front-runner. But Cruz drew support from conservative stars like former Alaska Governor Sarah Palin and money from national conservative groups like the Club for Growth.
"Ted Cruz won because he clearly articulated the pro-growth message that Republican voters across the country have responded to," Club for Growth President Chris Chocola said in a statement. Club for Growth's political action committee spent $5.5 million to support Cruz, the organization said.
The Senate seat is being vacated by Republican Kay Bailey Hutchison. Cruz, whose father is from Cuba, would become the first Hispanic U.S. senator from Texas if he defeats the Democratic nominee in November. Texas has not elected a Democrat to statewide office since 1994.
The Texas Tribune also projected that Paul Sadler won the Democratic U.S. Senate primary runoff on Tuesday.
Dewhurst, who presides over the state Senate, spent $19 million of his own money on the race, his campaign said. The former state land commissioner has served in the U.S. Air Force and worked for the Central Intelligence Agency.
He dismissed Cruz as not having enough experience and running a campaign that depended on groups from outside Texas.
Dewhurst received the most votes in a crowded field in the first round of the primary, but he did not secure the 50 percent plus one vote he needed to avoid a runoff with Cruz.
(Reporting By Corrie MacLaggan; Editing by Greg McCune and Stacey Joyce)