Let R be a commutative ring with identity, and let Z(R) be the set of zero-divisors of R. The annihilator graph of R is defined as the undirected graph AG(R) with the vertex set Z(R)* = Z(R) \ {0}, and two distinct vertices x and y are adjacent if and only if ann_R(xy) \neq ann_R(x) \cup ann_R(y). In this paper, all rings whose annihilator graphs can be embedded on the plane or torus are classified.