This paper develops a brain-computer-interface (BCI) based humanoid robot control system. The system consists of an electroencephalograph (EEG), a humanoid robot, and a CCD camera. The goal of our study is to control humanoid walking behavior through neural signals acquired by the 32 channel EEG. The humanoid robot is equipped with an onboard PC and has 20 degrees of freedom (DOFs). The CCD camera takes video clips of a subject or an instructor hand postures to identify mental activities when the subject is thinking "turning right," "turning left," or "walking forward." The developed control system is a powerful tool to investigate relationships between complex humanoid robot behaviors and human mental activities. As an example, in this study we implement three types of robot walking behaviors: turning right, turning left and walking forward based on robot kinematics, and perform two sets of experiments on acquiring brainwaves correlated to the mental activities. We propose an approach to extracting the features of brainwaves to control the robot walking behaviors.