Deep learning can extract predictive and prognostic biomarkers from histopathology whole slide images, but its interpretability remains elusive. We develop and validate MoPaDi (Morphing histoPathology Diffusion), which generates counterfactual mechanistic explanations. MoPaDi uses diffusion autoencoders to manipulate pathology image patches and flip their biomarker status by changing the morphology. Importantly, MoPaDi includes multiple instance learning for weakly supervised problems. We validate our method on four datasets classifying tissue types, cancer types within different organs, center of slide origin, and a biomarker - microsatellite instability. Counterfactual transitions were evaluated through pathologists' user studies and quantitative cell analysis. MoPaDi achieves excellent image reconstruction quality (multiscale structural similarity index measure 0.966-0.992) and good classification performance (AUCs 0.76-0.98). In a blinded user study for tissue-type counterfactuals, counterfactual images were realistic (63.3-73.3% of original images identified correctly). For other tasks, pathologists identified meaningful morphological features from counterfactual images. Overall, MoPaDi generates realistic counterfactual explanations that reveal key morphological features driving deep learning model predictions in histopathology, improving interpretability.