Selective caries excavation may support pulp preservation. This in vitro study investigated the influence of selective removal of demineralized dentin on marginal integrity of composite restorations as determined by dye penetration. Dentinal caries‐like lesions were produced in the approximal surfaces of 40 extracted human molars (ethylenediaminetetraacetate, 0.5 M, 96 h). The following test procedures were established: complete excavation, selective excavation, and caries‐free control. Two class II cavities with enamel at the cervical margins were prepared per tooth and demineralization volume was determined by micro‐computed tomography for the purpose of a stratified distribution to receive complete excavation or selective excavation. After complete or selective excavation (30 cavities each), adhesive composite restorations were placed. Cavities without demineralized dentin (20 cavities) served as control. The marginal integrity of restorations was evaluated by dye penetration with and without thermocycling or mechanical loading. Results were analyzed by non‐parametrical statistical tests (Mann‐Whitney U Test) with an α = 0.05 level of significance. Dye penetration did not differ significantly among completely excavated, selectively excavated, or undemineralized teeth, but was increased by thermocycling and mechanical loading in all experimental groups. Selective caries removal did not increase marginal penetration in class II restorations. The presence of remaining demineralized dentin surrounded by sound dentin did not impair marginal integrity of restorations with margins placed in sound enamel.