The best-known version of the story is that Bobby belonged to John Gray, Bobby was born on 4 May 1855.

When John Gray died he was buried in Greyfriars Kirkyard, the kirkyard surrounding Greyfriars Kirk in the Old Town of Edinburgh. Bobby then became known locally, spending the rest of his life sitting on his master's grave.

In 1867 the Lord Provost of Edinburgh, Sir William Chambers, who was also a director of the Scottish Society for the Prevention of Cruelty to Animals, paid for Bobby's licence and gave the dog a collar, now in the Museum of Edinburgh.

Bobby is said to have sat by the grave for 14 years. He died in 1872 and a necropsy by Prof Thomas Walley of the Edinburgh Veterinary College concluded he had died from cancer of the jaw.

Bobby was buried just inside the gate of Greyfriars Kirkyard, not far from John Gray's grave.

A year later, the English philanthropist Lady Burdett-Coutts was charmed by the story and had a drinking fountain topped with Bobby's statue (commissioned from the sculptor William Brodie) erected at the junction of George IV Bridge and Candlemaker Row (opposite the entrance to the churchyard) to commemorate him. The Greyfriars Bobby Fountain in Edinburgh includes a life-size statue of Greyfriars Bobby created by William Brodie in 1872. It was paid for by a local aristocrat, Baroness Burdett-Coutts, and unveiled on 15 November 1873.

Questions about the story's accuracy are not new. In a newspaper article in The Scotsman, "Greyfriars Bobby A Dog's Devotion" (11 August 1934), Councillor Wilson McLaren responds to contemporary questions about the accuracy of the stories by describing his own conversation, in 1871, with "Mr Traill" of "Traill's Coffee House" in relation to the dog he himself was then feeding, reassuring readers about the story Mr Traill had given him, and describing responses in 1889 to questions about the story's accuracy. A sense of the difficulty of determining accuracy is gained from two opposing letters to The Scotsman newspaper on 8 February 1889 (part of the debate referred to by McLaren), both from people claiming close links to Greyfriars Kirk, both claiming to have known of the dog personally but with opposing views over the accuracy of stories.

A red granite monument was erected close to Bobby's grave by The Dog Aid Society of Scotland and unveiled by the Duke of Gloucester on 13 May 1981.