Traffic congestion has become a nightmare to modern life in metropolitan cities. On average, a driver spending X hours a year stuck in traffic is one of most common sentences we often read regarding traffic congestion. Our aim in this arti-cle is to provide a method to control this seemingly ever-growing problem of traffic congestion. We model traffic dynamics using a continuous-time mass-flow conservation law, and apply optimal control techniques to control traffic congestion. First, we apply the mass-flow conservation law to specify traffic feasibility and present continuous-time dynamics for modeling traffic as a network problem by defining a network of interconnected roads (NOIR). The traffic congestion control is formulated as a boundary control problem and we use the concept of state-transition matrix to help with the optimization of boundary flow by solving a constrained optimal control problem using quadratic programming in MATLAB. Finally, we show that the proposed algorithm is successful by simulating on a network of interconnected roads based on the street map of Phoenix city.