This paper presents a microcontroller-based solution for generating real-time normal walking knee angle of a powered transfemoral prosthetic leg prototype. The proposed control algorithm was used to determine the prosthetic knee angle by utilizing seven hip angle movement features generated from only the inertia measurement unit (IMU) deployed on the prosthetic socket on the thigh of the same side. Then, a proportional–integral–derivative (PID) controller is developed to control the motor to reach the desired knee angle in real time. Furthermore, a novel parallel four-bar linkage-based master–slave validation framework combining a motion capture system was introduced to evaluate the performance of the knee angle generation on a speed-adjustable treadmill with able-bodied subjects. In the framework evaluation, 3 different walking speeds were applied to the treadmill to validate different speed adaptation capabilities of the prosthetic leg control system, precisely 50 cm/s, 60 cm/s, and 70 cm/s. Through the proposed 4-bar linkage framework, the prosthesis’s movement can simulate able-bodied subjects well with maximum RMSE never exceeding 0.27° in the swing flexion phase, 4.4° to 5.8° in the stance phase, and 1.953° to 13.466° in the swing extension phase. The treadmill results showed that the prosthetic leg is able to perform a normal walking gait following different walking speeds of the subject. Finally, a corridor walking experiment with a bypass adapter was successfully performed to examine the feasibility of real prosthetic walking situations.