Meshed dc or hybrid ac/dc distribution grids have attracted increasing interest lately and their power flow control is a major topic of study. Since the dc grids implemented with existing power converters lack sufficient control freedoms for proper power flow adjustment, it is necessary to develop new dc power flow controllers (DCPFCs) to effectively mitigate power flow congestion and line losses by optimizing the power flow of the connected feeders. Unlike previously introduced solutions, this paper proposes a DCPFC directly integrated in a modular multilevel dc transformer (M<sup>2</sup>DCT). The proposed DCPFC does not require external power supply and high-voltage isolation transformer, and features a simple structure, convenience for multiport extension and bidirectional power flow adjustment capability. The power flow control strategy and its energy balance scheme based on phase-shifted modulation are elaborated. The proposed topology and its performance are verified through a scaled-down experimental platform under typical operating conditions.