The 25-year old striker departs Upton Park after just eight months, following his January move from Bristol City, to sign a three-year deal with the Bluebirds for an undisclosed fee believed to be about £2.5million.
The Cardiff Twitter account read: “Welcome to #CardiffCity Nicky Maynard. DEAL DONE! Three years.”
Maynard scored three goals in 16 appearances in all competitions for the Hammers but will now continue his career at the Cardiff City Stadium.