ABSTRACT: Aim: The aim of this study is to evaluate the effect of cavity liner on marginal adaptation and microleakage of resin composite restorations placed with and without selective caries excavation. Materials and Methods: Class II cavities were prepared in 64 extracted upper premolar teeth followed by microbiological caries induction to simulate deep carious lesions. Composite restorations were performed: Group 1A: without liner and Group 1B: with resin‑modified glass ionomer liner after nonselective caries excavation; Group 2A: without liner and Group 2B: with resin‑modified glass ionomer liner after selective caries excavation. Maximum gap thickness was measured using a scanning electron microscope to assess the marginal adaptation, and dye penetration method was used for microleakage assessment. Results: There was a statistically significant difference between the groups in maximum gap thickness based on the type of caries excavation (P < 0.001) but not for the placement of liner. Selective caries excavation groups had higher values at all margins. Microleakage between the groups was significantly different, both at the occlusal (P = 0.006) and gingival margins (P < 0.001), with Groups 2A and 2B showing higher microleakage. Conclusion: Resin composite restorations performed after selective caries excavation showed decreased marginal integrity and liner application did not contribute to any significant improvement in the same. Keywords: Composite resin, dental caries, dental cavity lining, dental marginal adaptation