Whisk sugar into the vinegar mixture until dissolved.
Add onion slices and marinate at least 3 hours; drain.
Whisk mayonnaise, celery seed, salt, and pepper together in a separate bowl; add to drained onion slices and fold to coat. Marinate at least 2 hours before serving.