This paper presents an accurate and computationally efficient time-domain design method for the proportional–integral–derivative (PID) control of first-order and second-order plants in the presence of discrete time delays. As time delays would generally deteriorate the achievable performance of the PID controllers, their effects should be thoroughly considered in the controller design and parameter tuning process. This paper is thereby motivated to propose a time-domain semi-analytical method for the parameter tuning and stability analysis of PID controllers of the time-delay systems. To facilitate this development, the transfer functions of the investigated plants associated with the PID controllers are first rewritten as linear periodic delayed differential equations (DDEs) in state-space form. Then, the differential quadrature method (DQM) is adopted to estimate the time derivative of the state-space function at each sampling grid point within a duration of the time delay by the weighted linear sum of the function values over the whole sampling grid points. In this way, the DDEs in the time-delay duration are discretized as a series of algebraic equations, and the transition matrix can be obtained by combining these discretized algebraic equations. Thereafter, the stability boundary can be determined and the optimal control gains are obtained by minimizing the largest absolute eigenvalue of the transition matrix. As the minimum problems are commonly solved by the gradient descent approaches, the analytical form of the gradient of the largest absolute eigenvalue of transition matrix with respect to the control gains is explicitly presented. Finally, extensive numeric examples are provided, and the proposed DQM is proven to be an accurate and computationally efficient way to tune the optimal control gains and estimate the stability region in the control gain space.