A set of AlGaN epilayers were grown on sapphire (0001) substrate by MOCVD, with intermediate growths of low/high temperature AlN nucleation layers. Variable flow rates of trimethylindium (TMIn), 0, 50 and 500 sccm were introduced during growth. Three AlGaN samples were originally designed with similar Al composition of ~20%. Rutherford backscattering (RBS), RT and 10-300K photoluminescence (PL) were used for analyzing the microstructure of thin films. The Al content was calculated to decrease with increasing the In-flow rate. Main PL bands spread over 310-350 nm with peaks in 320-335 nm. PL (10-300K) exhibited anomalous temperature dependent emission behavior (specifically an S-shaped shift, i.e. red-blue-red shifts) of the AlGaN related PL emission. Carriers transfer between different luminescent centers. Abnormally high activation energy was obtained, which shows that the excitons are not in the free states. Raman Scattering and spectral line shape analysis leaded to an optical determination of the electrical property free carrier concentration of AlGaN. Our results on In-doped AlGaN provide useful information for designing UV-LEDs.