Let be a connected graph. The Wiener index of is defined as where is the distance between and in and the summation goes over all the unordered pairs of vertices. In this paper, we investigate the Wiener index of unicyclic graphs with given girth and characterize the extremal graphs with the second maximal and second minimal Wiener index.