The chemical and electronic structures of the 21st and 22nd proteinogenic amino acid selenocysteine (Sec), pyrrolysine (Pyl), and their derivatives (deprotonated and protonated ions) were extensively characterized for the first time. Through the fragment based step-by-step research on their potential energy surface (PES), electronic energies of the most stable conformers of Sec, Pyl and the related ions were finally determined at the advanced CBS-QB3 and DSD-PBEP86-D3(BJ)/ aug-cc-pVTZ levels, respectively, with the identification of many new low-energy conformers. The infrared spectra (IR) at 298 K of the most abundant conformers in different forms were scaled by comparison with the anharmonic frequency calculations and analyzed comparing with the experimental spectra of similar molecules. The characteristic soft X-ray spectra (including X-ray photoelectron spectra (XPS) and near-edge X-ray absorption finestructure spectra (NEXAFS)) of the most stable conformers at 498 K were also simulated. In particular, the two possible protonated configurations of Pyl can be clearly distinguished by their different spectral features. Furthermore, a small binding energy intersection appeared around 293 eV at the C 1s edge between the canonical and protonated Pyl conformers, which is different from all the previous studies. This work thus filled the gap in our knowledge by providing detailed information on the chemical and electronic structures of Sec and Pyl and will be a useful guidance for future experimental research.