James McLevy (1796–1873) was a detective in Edinburgh during the mid-19th century, and later an author of popular crime mysteries.