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