The edge-Wiener index $W_e(G)$ of a connected graph $G$ is the sum of distances between all pairs of edges of $G$. A connected graph $G$ is said to be a cactus if each of its blocks is either a cycle or an edge. Let $mathcal{G}_{n,t}$ denote the class of all cacti with $n$ vertices and $t$ cycles. In this paper, the upper bound and lower bound on the edge-Wiener index of graphs in $mathcal{G}_{n,t}$ are identified and the corresponding extremal graphs are characterized.