This paper explores how to interact with the Humanoid robot using the user defined hand gesture. First, the hardware architecture and the circuit design are described, and we explain how to design human-computer interface, and to regulate and set the motion of humanoid robot. And then the planning motion sequences are stored in the motion database. Second, the Inertial Measurement Unit (IMU) 6-DOF sensor worn on the wrist of human being is introduced. The sensor can communicate with computer through Bluetooth, and send back the data of Pitch, Roll, Yaw, and tilt angle of the three axes. Then we can interpret the meaning of hand gestures through the recognition algorithm implemented in the computer. The recognition result will be sent to the humanoid robot to do the corresponding movements. In this paper, we filter the signal by adaptive median filter firstly and then extract the features of the dynamic hand gesture by the frame method which is often used in speech. And then we implement the Longest Common Subsequence (LCS) algorithm of dynamic programming to recognize the dynamic hand gesture. Finally, all the experiments verify the performance and the feasibility of the proposed system.