Lincoln heard about the case, pardoned Scott, and returned him to his unit.
William Scott was actually standing before his firing squad when the death sentence and pardon were both read, however no one had told him that he had been pardoned.