At the end of the movie Ocean's Eleven, Danny Ocean went back to jail because he violated his parole.
Despite successfully pulling off the elaborate heist on the Bellagio casino vault, the owner, Terry Benedict, was unable to connect Danny directly to the theft.
Instead, Benedict used his influence to ensure Danny was arrested for the specific charge of parole violation. This occurred shortly after Danny and Tess shared a moment of reconciliation. Following Danny's arrest and departure, the rest of his team contemplated their successful operation before each going their separate ways with their share of the money.
In summary, Danny's return to prison wasn't due to being caught for the casino heist itself, but rather for breaking the rules of his previous release from jail.