A nondestructive assay method for measuring a shielded chemical compound has been proposed. The chemical compound is measured by using a nuclear resonance fluorescence (NRF) measurement technique with an energy tunable laser Compton-scattering (LCS) gamma-ray source. This method has an advantage that hidden materials can be detected through heavy shields such as iron plates of a thickness of several centimeters. A detection of a chemical compound of melamine, C(3)H(6)N(6), shielded by 15-mm-thick iron and 4-mm-thick lead plates is demonstrated. The NRF gamma-rays of (12)C and (14)N of the melamine are measured by using the LCS gamma-rays of the energies of up to 5.0 MeV. The observed ratio ((12)C/(14)N)(exp)=0.39+/-0.12 is consistent with (C/N)(melamine)=0.5.