Discount codes can't be deleted, but they can be made inactive.
To make a discount code inactive, head to Discount Codes >> Discount Codes >> click 'Detail' next to desired code >> click 'Edit'.
Then, set 'Status' to "Inactive" and save changes.
Once done, you'll be able to view the code in the inactive codes tab.
If you need to make the code active again, simply follow the steps above and select the "Active" status.