The hydrogels, because of their swelling properties in response to the environmental stimulus, are being widely considered for the design of controlled drug release systems. To meet the need for developing effective drug delivery methods, we developed special silica colloidal crystal (SCC)-embedded chitosan hydrogel films. The SCC films served as an interference substrate and drug storage layer, while the chitosan hydrogel served as a cover to regulate the drug release. The optical interferometry was performed to dynamically monitor the volume phase transition of chitosan hydrogel response to pH stimulation. Furthermore, the effects of crosslinking ratio and hydrogel thickness on the swelling properties of chitosan hydrogel were also evaluated. More importantly, the pH-responsive swelling of chitosan hydrogel was used to slowly release indomethacin. This system may provide support for drug delivery studies, therefore further expected to apply in the enhancement of the treatment efficiency of new drug therapies.