Bobby was described as a Skye Terrier dog that became famous in 19th-century Edinburgh, Scotland.
Bobby belonged to John Gray, who worked for the Edinburgh City Police as a night watchman, and the two were inseparable for approximately two years. Then, on 15 February 1858, Gray died of tuberculosis. He was buried in Greyfriars Kirkyard, the graveyard surrounding Greyfriars Kirk in the Old Town of Edinburgh. Bobby, who survived John Gray by 14 years, is said to have spent the rest of his life sitting on his master's grave. A more realistic account has it that he spent a great deal of time at Gray's grave, but that he left regularly for meals at a restaurant beside the graveyard, and may have spent colder winters in nearby houses.
In 1867, when it was pointed out that an unowned dog should be destroyed, 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 a renewal of Bobby's licence, making him the responsibility of the city council.
Bobby died in 1872 and could not be buried within the cemetery itself, since it was consecrated ground, instead he was buried just inside the gate of Greyfriars Kirkyard, not far from John Gray's grave.