In this work a self-tuning rate and queue based proportional and integral controller called SRQ-PI is proposed to efficiently control the queue length with small overshoot and faster settling time. SRQ-PI proposes a new control tracking function that maps level of congestion to the packet drop probability dynamically. In SRQ-PI, the incoming traffic rate is estimated and used with the proportional and integral controller. The SRQ-PI tunes itself and stabilizes the system with internal feedback without requiring any external feedback. Furthermore, the stability of the SRQ-PI is analyzed using control theory and presents systematic guidelines to select the control gain parameters. NS2 is used to carry out the simulation work. The simulation result demonstrates that SRQ-PI is stable and gets faster transient response due to lower average delay jitter and robust against dynamic network parameters. The SRQ-PI outperforms proportional integral (PI), Intelligent adaptive PI (IAPI) and Random exponential marking (REM) algorithm.