In recent years, smart hydrogels have been widely applied to various types of hydrogel actuators due to their unique stimulus responsibility, such as temperature responsiveness, near-infrared (NIR) light responsiveness, pH responsiveness, etc. Herein, segmented poly (N-isopropyl acrylamide) (PNIPAM) based hydrogel actuators with both temperature and NIR light actuation behaviors were constructed. Polydopamine (PDA) was firstly used to modify MXene nanosheets to fabricate an efficient photothermal conversion material. Then they were added into PNIPAM matrix to prepare PDA@MXene/PNIPAM hydrogels. The prepared PDA@MXene/PNIPAM hydrogels exhibited three-dimensional network structure with the tensile strength of 26.84 kPa, and they were successfully assembled into segmented hydrogel actuators. The assembled segmented hydrogel actuator exhibited high bending angle of 470° in 1.75 s in 55 °C hot water and bending angle of 203° in 15 s when irradiated by 6 W/cm2 NIR light. The segmented hydrogel actuators displayed good programmable actuation performance. Finally, they were applied as smart devices, such as hydrogel hook for grasping object, switch for controlling circuit and valve for governing fluid flow. This work provides a novel strategy for fabricating programmable hydrogel actuators and will inspire new ideas and constructions for smart soft hydrogel actuators.