The story is one of cricket's foundational origin myths and is almost entirely contemporaneous-documented. Bernard James Tindal Bosanquet, born in 1877 to a Huguenot-descended Middlesex family, was an Oxford Blue and a useful medium-pace bowler when he began experimenting around 1897 with a parlour game called 'Twisti-Twosti'. The game involved bouncing a tennis ball across a table with such spin that an opponent could not catch it on the rebound. Bosanquet realised that if a ball could be made to bounce one way after appearing to be released for the other, a batsman might be similarly deceived.
He transferred the experiment from billiard table to net practice, first with a soft ball and then with a hard one. The mechanics — a leg-break grip with the wrist rotated through more than 180 degrees so that the back of the hand faced the batsman at delivery — caused the ball to spin from off to leg, the opposite of a conventional leg-break. Bosanquet first deployed it in club cricket in 1899 and in first-class cricket for Middlesex against Leicestershire at Lord's on 20 July 1900, dismissing Sam Coe with a delivery that bounced four times before reaching the wicket — a 'wide long-hop' that Coe somehow contrived to chop into his stumps. Bosanquet later claimed the wicket as the world's first googly dismissal in first-class cricket.
Within three years Bosanquet was using it sparingly in Tests; his Test debut came in the 1903-04 Ashes tour. In the fourth Test at Sydney in February 1904 he took 6 for 51 in the second innings, bowling England to victory. By 1905 the googly was being copied — first by South African leg-spinner Reggie Schwarz, who learnt it directly from Bosanquet at Middlesex, and then by Schwarz's compatriots Vogler, Faulkner and White, who collectively built the South African 'googly attack' that toured England in 1907.