In the present research work, the structural, electrical, optical, and thermodynamic properties of the BexMgyZn1−x-yO quaternary alloy were investigated. Its conventional structure, which is composed of the binary compounds ZnO, BeO, and MgO, and their ordered ternary alloys BexZn1−xO, BexMg1−xO, and MgxZn1−xO. A non-linear variation of lattice constants (a) and bulk modulus (B) as a function of the compositions (x, y) in BexMgyZn1−x-yO alloys is observed due to varying atomic radii of the constituent elements leading to the structural distortion against compositional changes. Both the ternary and quaternary alloys exhibit semiconducting properties, characterized by a direct bandgap ranging from 2-4 eV. This indicates their absorption and emission of light in the visible region of the spectrum, making them promising candidates for optoelectronic applications. The results of optical characteristics display the variation of refractive index and absorption coefficient of these alloys with respect to composition and wavelength. Present results will forecast the possible applications and guidelines for synthesizing such alloys under extreme conditions.