A novel design for a reconfigurable antenna is proposed for 5G communication systems. The antenna operates in two bands 28 and 38 GHz. Two parallel slots have been created in the upper surface of the SIW antenna cavity. The configurability of the antenna is achieved through a rotary strip where the orientation of the strip specifies the operating frequency of either 28 or 38 GHz. The controlling strip can be rotated while touching the upper external wall surface of the SIW cavity through a micro-electro-mechanical system (MEMS) servomotor. At the orientation where the rotary strip is rotated to be normal to the feed line and parallel to the slots, it operates at 28 GHz. At the orientation where the rotary strip is rotated to be parallel to the feed line and normal to the slots, it operates at 38 GHz. When the rotary strip is normal to the two radiating slots, it divides each slot into two equal slots. The radiation efficiency is improved by the dual-slot configuration at the two operating frequencies 28 and 38 GHz. The bandwidth at 28 GHz band is 1.1 GHz and at 38 GHz band 0.9 GHz. The peak value of the gain at the 28 GHz band is 5.4 dBi with a radiation efficiency of 80.5% and at the 38 GHz band 6 dBi with a radiation efficiency of 82%. To verify the achieved numerical results by simulations, a prototype of the antenna is fabricated and subjected to practical measurements showing good consent with the simulation results.