The invention relates to a hydraulic swing cylinder and potential sensor closed-loop control based modular robot driving joint. The modular robot driving joint includes a mechanical section and a control section. The mechanical section includes a driving joint L-shaped carrier, a plane side plate, a hydraulic swing cylinder, a swing cylinder gear, a potentiometer gear, a potentiometer connection block, a hydraulic swing cylinder cushion block, a swing cylinder backing plate A, a swing cylinder backing plate B, a fixing end cover, a motor and hydraulic pump support, and a shaft coupling. The control section includes a host computer, a potentiometer sensor, a signal control card, a flowmeter, a hydraulic pump and a hydraulic pump driving motor. According to the invention, a function relationship between the flow of the hydraulic pump and the rotation angle of the hydraulic swing cylinder of the driving joint is established, the rotation angle of the hydraulic swing cylinder can be adjusted in real time, and then a closed feedback loop is formed, and accurate control of the hydraulic swing cylinder can be achieved; the robot hydraulic driving joint can output large torque, is simple in structure, and is modular and standardized; series connection of mechanical arms and rapid establishment of multi-degree of freedom mechanical arms can be achieved, and modular production can be achieved.