Authorities said Monica Paul, 31, argued with the suspect, Kenneth A. Duckett, 37, before he allegedly opened fire about 6:30 p.m.
Duckett, the father of her two children, then ran from the building and drove off in a white Jeep with another man, who has not been identified, authorities said. The vehicle was later found; both men remained at large late Thursday.
Witnesses said YMCA staffers and parents helped get the children out of the building. None of the children was hurt, authorities said.
Essex County Prosecutor Paula T. Dow said Paul was shot multiple times at close range as she sat with her daughter in a waiting area outside the pool where her 4-year-old son was swimming. Witnesses told investigators they heard at least three or four shots.
Authorities said the slain woman was granted a restraining order against Duckett late last year.