Cardiff started the better of the two sides but the hosts were ahead after 32 minutes when Stephen Pearson converted an accurate Jonathan Stead cross.
Mark Hudson nearly equalised for Cardiff just moments later but the centre-back's header crashed against the crossbar.
Bristol were further ahead before the interval when Martyn Woolford raced clear of the Cardiff defence before slotting the ball past into the corner of the net.
The visitors pulled a goal back 10 minutes into the second half when Joe Mason headed in a Peter Whittingham cross.
However, Bristol restored their two-goal lead in the 70th minute when Woolford collected a pass from substitute Sam Baldock before firing in his second of the match.
Heidar Helguson threatened to force a dramatic comeback when he converted a low cross from Kevin McNaughton.
Baldock had other ideas, though, as the striker finished well from outside the area to confirm the result for the Robins.