The best-known version of the story is that Bobby belonged to John Gray, who worked for the Edinburgh City Police as a nightwatchman. 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 until his death in 1872.
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.