Rankin had a successful World Cup in the Caribbean, and finished as Ireland's leading wicket taker of the tournament, with 12 wickets in his 9 matches at an average of 27 at a strike rate of 29.67. In Ireland's second game of the 2007 ICC World Cup, Rankin took 3/32 to bowl Pakistan out for 132 and win the match, causing a major upset. Ireland's victory against Pakistan ensured they progressed to the next round. A stress fracture of the fibula forced Rankin to miss ODIs against India and South Africa in 2007 which Ireland lost.