The problem of a guaranteed cost controller design of networked control systems under transmission control protocol (TCP) is derived. To improve the overall performance of the networked control system, a scheme to simultaneously control the plant and the network is presented. An analytical TCP model is used to design active queue management (AQM) to achieve the desired queue length, which is helpful in reducing the variation of the network induced delay. Moreover, a new closed loop model of networked control systems is obtained by augmenting the TCP communication model with the control plant. The guaranteed cost controller is addressed in terms of a linear matrix inequality (LMI) to render the system asymptotically stable based on Lyapunov‐Krasovskii theory and weighted technology. Finally, numerical simulations are included to demonstrate the theoretical results.