Non-linear optical (NLO) dyes used as guests in polymeric films have recently attracted interests in optical applications. In this regard, dye-grafted polymeric systems can outperform conventional guest–host dye-containing films because they have lower loading limitations and aggregation problems. These give rise to enhanced molecular orientation. The work presented here is an attempt to study the laser-induced birefringence for a novel sol–gel based polymeric nanocomposite prepared by reacting an NLO dye (methyl red) and an epoxy silane coupling agent at different concentrations of dye. 3-Glycidoxy propyltrimethoxysilane was hydrolyzed and condensed to prepare a siloxane structure from which a dye-containing hybrid was obtained. The structural and morphological properties of the resulting nanocomposites were studied by FTIR spectroscopy, differential scanning calorimetry and transmission electron microscopy. Results showed that the dye was chemically attached to the siloxane structure built through sol–gel processing. This chemical modification leads to nanostructured morphology in which inorganic phase was entangled to the organic phase. The size of clusters formed was 60–80 nm in dimension. The optical responses of nanocomposites were investigated at different process parameters, including dye concentration, film thickness and curing regimes. These were then discussed based on the photochemical and photothermal properties of the dye molecules, the rotation dynamic of which was shown to strongly depend on the physical and chemical properties of the host. The samples with 8 wt% of dye revealed the maximum birefringence, while the sample with 10 wt% showed the best memory effect. The best condition for curing was found to be 24 h. By increasing the film thickness, there was an increase in the amount of induced birefringence.