Yardy made his Sussex debut in an early-season NatWest Trophy game against Hertfordshire in May 1999, although it was not a very successful way to begin his career: opening the batting, he was lbw for nought and went for 14 from two wicketless overs. He also played a one-day game against Sri Lanka A, again with little success, and though he played a few games the following year it was only in 2001 that he became anything like a regular in the side. He played ten games in 2002, but only seven in total over the next two years, before returning with a vengeance in 2005.
He enjoyed an excellent domestic summer that season, making 1,520 first-class runs at 56.29 with five centuries, including a career-best 257 against the Bangladeshis in May. Only Murray Goodwin, who hit 344* in 2009, had made a higher score for Sussex since the Second World War. In the one-day game, Yardy was less successful with the bat, averaging well under 20, but he achieved a career-best bowling performance of 6-27 against Warwickshire in the totesport League.
He was appointed as Sussex's County Captain for the 2009 season, succeeding Chris Adams.
In his first Season as captain he led Sussex to the Twenty20 Cup and the Pro 40 titles. He stood down as Captain of Sussex for the County Championship and CB40 competition in July 2012 and the Friends Life T20 at the end of the year. He was replaced by Ed Joyce for the Championship and CB40 and Chris Nash for the Friends Life T20.
Yardy was picked for the England A tour of West Indies in 2005-06, and the following summer he forced his way into the full England team. On 10 August 2006, he was provisionally selected for England's ICC Champions Trophy initial squad of 30, retaining his place in the final 14-man squad that was announced on 12 September. On 23 August, he was also named in the 16-man squad for the NatWest Series of One Day Internationals against Pakistan.
Making his full international debut in the Twenty20 international at Bristol on 28 August, Yardy made a useful unbeaten 24 from 14 balls and followed this with an excellent catch to dismiss Shahid Afridi off the bowling of Jamie Dalrymple. Yardy then proceeded to have Mohammad Yousuf caught by Ian Bell to claim his first international wicket and cap a personally successful debut, although he could not prevent England succumbing to a five wicket defeat.
On 8 September Yardy made his England ODI debut against Pakistan at Trent Bridge, where he bowled Mohammad Yousuf for 29 and caught and bowled Shoaib Malik for a duck. Later that match he had the Pakistani wicket-keeper Kamran Akmal caught at slip by captain Andrew Strauss. In his ten overs Yardy took 3-24, the best figures by an England spinner on his ODI debut.
In December, Yardy was excluded from the England squad for the Commonwealth Bank one-day series in Australia following a disappointing ICC Champions Trophy performance in India. There was a consolation for the all-rounder early in 2007, however, as he was named captain of the England A squad to tour Bangladesh, indicating that he might be able to revive his England career. On 22 June 2007, Yardy was selected in the 14-man ODI and Twenty20 squad for England against the West Indies.
He was recalled in 2010 to England's Twenty20 squad for the 2010 World Twenty20 in the West Indies. He was ever-present in the tournament, taking 4 wickets at an average of 34.00 and economy rate of 6.80, which England won after beating Australia in the final.
Yardy was then recalled to the ODI side and was again ever-present in the early-summer series against Australia and then Bangladesh, which England won 3-2 and 2-1 respectively. Although he only took 4 wickets in 8 games, he proved to be economical, going at only 4.36 an over, and he also picked up his first international half-century, scoring 57 at The Oval against Australia.
Yardy was selected in England's 15-man squad for the 2011 World Cup, hosted by Bangladesh, India, and Sri Lanka between February and April. He opened the bowling in a match against South Africa, just the second time a spinner had opened the bowling for England in ODIs. On 24 March 2011 it was announced that Yardy had flown home from the Cricket World Cup suffering with depression.