The translational symmetry breaking of a crystal at its surface may form two-dimensional (2D) electronic states. We observed one-dimensional nonlinear optical edge states of a single atomic membrane of molybdenum disulfide (MoS2), a transition metal dichalcogenide. The electronic structure changes at the edges of the 2D crystal result in strong resonant nonlinear optical susceptibilities, allowing direct optical imaging of the atomic edges and boundaries of a 2D material. Using the symmetry of the nonlinear optical responses, we developed a nonlinear optical imaging technique that allows rapid and all-optical determination of the crystal orientations of the 2D material at a large scale. Our technique provides a route toward understanding and making use of the emerging 2D materials and devices.