For men use to write an evill turne in marble stone, but a good turne in the dust. [More, 1513]
To write (something) off (1680s) originally was from accounting; figurative sense is recorded from 1889. Write-in "unlisted candidate" is recorded from 1932.