Despite advances in assistive technology, existing prosthetic knees still have some limitations, such as weight, low active and braking torque, and high energy consumption. This paper presents an active magnetorheological knee (AMRK) actuator developed for transfemoral prostheses. The system consists of a motor unit comprising an EC motor, harmonic drive and magnetorheological (MR) clutch. The motor unit provides active motion, working in parallel with an MR brake. With this configuration, the AMRK possesses multiple functions; it can work as a motor, clutch, or brake, reproducing movements similar to those of a healthy knee in different activities. All components of the prosthetic knee are protected to avoid risk of accidents and to provide an aesthetically appropriate structure. To reduce weight, energy consumption and volume, the MR clutch/brake geometric design was optimized using a particle swarm optimization algorithm. A prototype was fabricated and tested to evaluate the AMRK performance. Dynamic models of the MR clutch, MR brake and motor unit were analysed, and torque control was implemented. The results show that the AMRK is promising for the proposed applications, which require multiple functions with compact size, low weight, low energy consumption, high active and braking torque, and quick response time.