In this paper an optimal Immune-Proportional-Integral-Derivative (Immune-PID) scheme is suggested to control to the heart rate of humans and regulate it, based on Yanagihara, Noma, and Irisawa (YNI) as mathematical model of the heart rate. The parameters of the suggested immune PID controller are optimized by using Biogeography-Based-Optimization (BBO) algorithm. In addition, the proposed controller scheme is implemented using Field Programmable Gate Array (FPGA) due to its great data storage capacity, low consumption of energy, and high speed of operation. The Xilinx system generator blocks and Spartan-6 (XC6SLX45T-3FGG484) board are used due to availability with 1% utilization of hardware platform slices. The performance of the proposed controller is compared to traditional PID and immune controllers. That comparative analysis results show best improvement when using the proposed controller with 0% maximum overshoot, a reduction of steady state error and rising time reaches to 0.1 and 0.0023 second respectively and faster response reaches to 0.01 second.