In this study, bidirectional dc-dc (BDC) converter-based dynamic voltage restorer (DVR) is proposed for compensation of severe voltage sag/swell problems in a medium voltage system. Among these problems, voltage swells provoke the voltage rise at dc-link capacitor of DVR. This undesirable situation may explode the dc-link capacitors and switches, and cause high-power losses. In DVR topologies, unidirectional dc-dc converter-based DVRs allow only monodirectional power energy transfer from battery to dc-link capacitor. To prevent voltage rise at dc-link capacitor under severe voltage swell conditions, bidirectional power flow must be achieved between dc-link capacitor and battery. The main contribution of this study is that BDC converter is first exploited in DVR to solve voltage rise problem at dc-link capacitor during voltage swell. Owing to this topology, power can flow both from battery to dc-link capacitor of multilevel inverter or vice versa. For this purpose, proportional-integrator (PI) controller-based algorithm is improved for BDC converter to compensate voltage sags/swells. This algorithm keeps the dc-link voltage constant during voltage sag/swell. The validity of proposed topology and control method is verified with PSCAD/EMDTC. The performance results demonstrate that BDC converter-based DVR achieves good performance to control dc-link voltage under voltage sag/swell situations.