By the middle of the 2009 season, it had appeared likely Smith's future lay away from Sussex, and after Middlesex managing director of Cricket Angus Fraser watched him turn out for, he signed in October for the London-based club on a contract until 2012. In the same month, he was named in an England performance squad. In his first season, he was restricted to four County Championship appearances by Shaun Udal's presence, but featured extensively in the two limited-overs competitions, and won the Man of the Match award for taking 5–24 v Kent at Lord's. It was a similar story in 2011 – when the club signed his former team-mate Rayner on loan from Sussex in a deal which later become permanent and gave a short-term contract to Jamie Dalrymple – and 2012, as he played four Championship matches in that time but continued playing the majority of the limited-overs matches.
Smith signed a one-year contract with Middlesex for 2013, and things started brightly after he was included in the team for two Championship and three Yorkshire Bank 40 matches before the end of May. However, with Rayner making himself difficult to dislodge thanks to his batting and fielding ability and improving bowling performances, and Ravi Patel emerging, Smith was loaned to Gloucestershire in a deal that was ultimately extended until the end of the season. Highlights of his time there have included a YB40 hat-trick, a maiden first-class four-for and a maiden first-class 50 On 24 September 2013, as the 2013 season was finishing, Smith signed a three-year deal to take him up to the end of the 2016 season.