It was the prison and place of execution immortalized in the novel Heart of Midlothian, by Sir Walter Scott.
Sir Walter Scott wrote about a prison and place of execution.
The Heart of Midlothian has nothing to do with any prisons or executions.