The process in which heme, any compound of iron complexed in a porphyrin (tetrapyrrole) ring, is transported from one side of a membrane to the other by means of some agent such as a transporter or pore.