In this paper, a novel fragile watermarking scheme based on Discrete Cosine Transform (DCT) using Particle Swarm Optimization (PSO) algorithm is presented. Embedding watermarks in frequency domain can usually be achieved by modifying the least significant bits (LSBs) of the transformation coefficients. After embedding process is completed, a number of rounding errors appear due to conversion of real numbers into integers in the process of transformation of image from frequency domain to spatial domain. A population based stochastic optimization technique (PSO) is proposed to correct these rounding errors. Simulation results show the feasibility of employing PSO for watermarking and the accuracy of this novel method.