AbstractAimLight Detection And Ranging (LiDAR) is a promising remote sensing technique for ecological applications because it can quantify vegetation structure at high resolution over broad spatial extents. Using country‐wide airborne laser scanning (ALS) data, we test to what extent fine‐scale LiDAR metrics capturing low vegetation, medium‐to‐high vegetation and landscape‐scale habitat structures can explain the habitat preferences of threatened butterflies at a national extent.LocationThe Netherlands.MethodsWe applied a machine‐learning (random forest) algorithm to build species distribution models (SDMs) for grassland and woodland butterflies in wet and dry habitats using various LiDAR metrics and butterfly presence–absence data collected by a national butterfly monitoring scheme. The LiDAR metrics captured vertical vegetation complexity (e.g., height and vegetation density of different strata) and horizontal heterogeneity (e.g., vegetation roughness, microtopography, vegetation openness and woodland edge extent). We assessed the relative variable importance and interpreted response curves of each LiDAR metric for explaining butterfly occurrences.ResultsAll SDMs showed a good to excellent fit, with woodland butterfly SDMs performing slightly better than those of grassland butterflies. Grassland butterfly occurrences were best explained by landscape‐scale habitat structures (e.g., open patches, microtopography) and vegetation height. Woodland butterfly occurrences were mainly determined by vegetation density of medium‐to‐high vegetation, open patches and woodland edge extent. The importance of metrics generally differed between wet and dry habitats for both grassland and woodland species.Main conclusionsVertical variability and horizontal heterogeneity of vegetation structure are key determinants of butterfly species distributions, even in low‐stature habitats such as grasslands, dunes and heathlands. The information content of low vegetation LiDAR metrics could further be improved with country‐wide leaf‐on ALS data or surveys from drones and terrestrial laser scanners at specific sites. LiDAR thus offers great potential for predictive habitat distribution modelling and other studies on ecological niches and invertebrate–habitat relationships.