The engineering of the architecture of the quantum wires has shown a real challenge in the scientific community owing to their fascinating and auspicious application potential in the field of optoelectronics. The modulation of the morphology and structure of the quantum wires may give rise to the modulation of the energy levels and band offset positions to enhance the charge carriers transfer through any electronic device and improve the overall performance for the future application in the field of spintronics and photonics. Here, we proposed, for the first time, a novel rectangular architecture based AlxGa1-xAs and GaxIn1-xAs quantum wires to engineer the electron energy spectrum according to a wide range of applications in electronics and optical devices. The electron energy levels in rectangular AlxGa1-xAs and GaxIn1-xAs quantum wires with infinite potential barrier were calculated at different x values and different cross-section areas to explore the role of dopant and compared with the cylindrical shape. The calculations of the electron confinement energy in the first and second energy levels indicate that the energy value in cylindrical quantum wire is less than its value in rectangular one while for E3 the energy value in cylindrical quantum wire is larger than its value in rectangular one for all values of x. The confinement energy was found to be inversely proportional to the ratio of the doped material. The electron energy dispersion in AlxGa1-xAs and GaxIn1-xAs quantum wires of 100 nm2 cross-section area, x = 0.4 for E1, E2 and E3 with the wave vector value has been investigated. The calculations of the first and second energy levels indicated that the energy value in cylindrical quantum wire is less than its value in rectangular one for E1 and E2 while for E3 the energy value in cylindrical quantum wire is larger than its value in rectangular with a distinct value for each wave vector value for all x values. These unique features of the proposed novel architecture may open a new avenue for the future applications in photonics, spintronics and waveguides.