Kylian Kouassi had put Colchester in front.
Moylan – who joined Cardiff in midweek from Lincoln – curled in the winner in the 77th minute.
More from us
Did you know you can manage your profile, and explore all of the available newsletters from Ireland Live within your account.