A toxin that has had its toxic properties removed, but retains its ability to generate an immune response.