Former shadow home secretary David Davis has eased to victory in the Haltemprice and Howden by-election with a 15,355 majority and 72% of the vote.
He quit as an MP in June over the government's plans to detain terror suspects for up to 42 days.
The Tory MP said voters had delivered a "stunning message to the government".
The turnout was 34%, with the Green Party coming second on 1,758 votes and the English Democrats third on 1,714. The Lib Dems and Labour did not stand.
Mr Davis said: "We have fired a shot across the bows of Gordon Brown's arrogant, arbitrary and authoritarian government."
He said he would return to Westminster on Monday with a mandate "to fight Gordon Brown's vision of Big Brother Britain tooth and nail, to stop 42 days in its tracks, to prevent the disaster of ID cards before it happens, to protect our personal privacy from being ransacked by the ever-intrusive state".
We have fired a shot across the bows of Gordon Brown's arrogant, arbitrary and authoritarian government
He admitted it was unlikely that Tory leader David Cameron would invite him back onto the party's front bench.
"I took on board that I would lose my shadow cabinet post and probably my shadow cabinet future," he said. "I accept that."
Mr Davis denied that he would become a "single-issue campaigner", but promised to "put a lot of effort" into opposing 42 days' detention.
He told BBC Radio 4's Today programme: "The trouble with this is, from the beginning, the Westminster village hasn't really understood that someone wants to take a stand on a matter of principle that may have some effect on themselves."
Mr Davis also accused the government of "spectacular cowardice" for not fielding a candidate.
But Home Office minister Tony McNulty called the by-election had been "a vain stunt that became and remains a farce".
He added: "Labour never believed a parliamentary by-election should be held at taxpayers' expense to resolve tensions at the top of the Conservative Party."
The Green Party questioned Mr Davis's stance on some civil liberties issues - including his support for the 28-day limit on holding terror suspects without charge, increased from 14 days in 2005, and his views on capital punishment and gay rights.
Rape law campaigner Jill Saward, who stood as an independent, criticised his opposition to extending the DNA database and CCTV - which she sees as "the very tools the police need to keep us safe".
Out of a record 26 by-election candidates, 23 lost their deposits after failing to attract 5% of the vote.
At the last general election Mr Davis won the seat with a 5,116 majority.
However, the 17,113 votes he polled were fewer than the 22,792 he achieved at the 2005 election, and turnout was also down from 70.2%.
The Lib Dems - who came second in 2005 - chose not to run because they also opposed the government's plans to extend the time limit on holding terrorism suspects.
Labour refused to stand, describing the by-election as a farce and a waste of more than £80,000 of public money.
After the result was declared, Mr Davis said that before he resigned his seat, polls showed 69% of people supported the government on 42 days.
That figure now stood at 39%, he added.
Among those who backed his campaign and attended debates in the constituency were Bob Geldof, Iraq war veteran Col Tim Collins and Labour MP Bob Marshall Andrews.
Other parties who contested the election included the English Democrats and Christian Party.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.