It seems that the city of Moroni was strategically placed at the Nephite-Lamanite border "on the south by the line of the possessions of the Lamanites" (Alma 50:13). In Alma 51:22, Moroni is the first city that the Lamanite king Amalickiah attacks in his invasion of the land of Zarahemla. Perhaps it was located near a natural boundary such as a river, a mountain pass, or a narrow passable land strip in swampy land?
According to Joseph Allen, Mormon many times tends to locate a land in relationship to one direction or axis, and then locate it in reference to another direction or axis. Thus the city of Moroni was "by the east sea" (east-west direction = "x" axis), and "on the south by the line of the Lamanites" (north-south direction = "y" axis).