Hancock was selected as the Conservative candidate for West Suffolk in January 2010. He narrowly won the contest, defeating Natalie Elphicke (a solicitor who later became MP for Dover), by 88 votes to 81 in the final ballot. He was elected as the constituency’s MP at the 2010 general election with 24,312 votes, 13,050 votes ahead of Liberal Democrat candidate Belinda Brooks-Gordon. In June, Hancock was elected to the Public Accounts Committee. He served on this committee until November 2012. Hancock also served on the Standards and Privileges Committee from October 2010 and December 2012.

In 2011, Hancock became a member of the Free Enterprise Group, a group of Thatcherite Conservatives co-founded by Liz Truss. In January 2013, he was accused of dishonesty by Daybreak presenter Matt Barbet after claiming he had been excluded from a discussion about apprentices after turning up “just 30 seconds late”. Hancock acknowledged on social media that he was running late, but said he turned up ahead of time for the interview and was unfairly blocked from going on set by producers. Barbet said Hancock knew he was “much more than a minute late” and he should have arrived half an hour beforehand to prepare for the interview.

In October 2013, Hancock joined the Department for Business, Innovation, and Skills as the Minister of State for Skills and Enterprise.

In June 2014, Hancock encouraged employers to become involved in offering more apprenticeships, allowing young people to learn and earn simultaneously.

On 15 July 2014, Hancock was appointed to the position of Minister of State for Business and Enterprise. He also took on additional responsibilities as the Minister of State for Portsmouth. On 27 July, he announced protection from fracking for National Parks, seen as a method of reducing anger in Conservative constituencies ahead of the election. Interviewed on the BBC Radio 4 Today program, he rejected the suggestion that fracking was highly unpopular but he was unable to name any village that backed it.

In his role as Minister of State for Energy, he was criticised for hiring a private jet with senior diplomatic officials to fly back from a climate conference in Aberdeen, where he signed a deal with the Mexican President to use British expertise in Mexico. A DECC spokesman said the chartered flight was organised to fit around diary commitments, and the conference was not about climate change, but it was a visit to a university and discussion about investment. Hancock was later criticised for accepting money from a key backer of the climate change denial organisation Global Warming Policy Foundation. In October 2014, he apologised after retweeting a poem suggesting that the Labour Party was “full of queers”, describing his actions as a “total accident”.

Hancock became Minister for the Cabinet Office and Paymaster General on 11 May 2015. Hancock launched a new social mobility drive to promote diversity within the civil service, outlining his vision in a speech in February 2016. He headed David Cameron’s “earn or learn” taskforce which aimed to have every young person earning or learning from April 2017. He announced that jobless 18- to 21-year-olds would be required to do work experience as well as looking for jobs, or face losing their benefits.

In the 2016 UK referendum on EU membership, Hancock supported the UK remaining within the EU.

Hancock moved to the Department for Culture, Media, and Sport as the Minister of State for Digital and Culture on 15 July 2016 after Theresa May became Prime Minister. As minister for digital policy, Hancock in June 2017 recommitted to a “full fibre” digital policy. This promised that 97% of the UK would enjoy “superfast broadband” at speeds of at least 24 megabits per second by 2020.