It was by no means a Cup classic between two unlikely semi-final opponents from the Championship, but the early goal paved the way for a lively encounter.
But as with Saturday's opening semi-final at Wembley, one goal was enough to decide the game.
It came from the left boot of Cardiff-born midfielder Ledley, who reacted well to convert the first chance of the game.
Barnsley responded well to such an early setback and they enjoyed the lion's share of the first-half possession.
Dennis Souza had a header just past the post and Brian Howard wasted a good shooting chance after good work from Jamal Campbell-Ryce on the left.
The lively Odejayi got in front of Glenn Loovens at the near post but shot at Peter Enckelman.
However, Cardiff came even closer to adding to the scoreline when Steele failed to deal with a Jimmy-Floyd Hasselbaink shot but then did brilliantly to keep out Sinclair's follow-up.
Odejayi blew Barnsley's best chance of the game
Again Barnsley responded well with Istvan Ferenczi heading wide and then Sinclair cleared off the line to deny him.
The Tykes' top scorer Howard also tried his luck from long range and then headed wide from a Martin Devaney cross.
But Barnsley's need to throw men forward allowed Cardiff ample counter-attacking opportunities and Ledley was able to pick out Rae for a free header but it was too close to keeper Steele.
The moment Barnsley will rue came in the 66th minute when Odejayi was put clean through on goal and had all the time in the world to pick his spot past Peter Enckelman.
The striker scored the winner against Chelsea in the sixth round - his only goal since September - but he blew his big chance this time as he shot past the upright.
Pete Whittingham went close to giving Cardiff some daylight but his effort landed on the roof of the net.
It mattered little as Cardiff, who were playing at Wembley for the first time in 81 years, played out time to book another visit there in six weeks.
Bookmark with:
What are these?