Found in moist deciduous and mixed forests, woodland edges, marshy woodland and river valleys. Leptura quadrifasciata is especially associated with humid forests and damp lowland habitats.
Adults are commonly found on flowers.
The larvae develop mainly in decaying dead wood of deciduous trees, such as Alnus sp., Betula sp., Fagus sp., Populus sp., Quercus sp., Salix sp. and Tilia sp.