Anelasticity, as an intrinsic property of amorphous solids, plays a significant role in understanding their relaxation and deformation mechanism. However, due to the lack of long-range order in amorphous solids, the structural origin of anelasticity and its distinction from plasticity remain elusive. In this work, using frozen matrix method, we study the transition from anelasticity to plasticity transition in a two-dimensional model glass. Three distinct mechanical behaviours, namely elasticity, anelasticity, and plasticity, are identified with control parameters in the amorphous solid. Through the study of finite size effects on these mechanical behaviors, it is revealed that anelasticity can be distinguished from plasticity. Anelasticity serves as an intrinsic bridge connecting the elasticity and plasticity of amorphous solids. Additionally, it is observed that anelastic events are localized, while plastic events are subextensive. The transition from anelasticity to plasticity is found to resemble the entanglement of long-range interactions between element excitations. This study sheds light on the fundamental nature of anelasticity as a key property of element excitations in amorphous solids.