Renal hypoxia could result from a mismatch in renal oxygen supply and demand, particularly in the renal medulla. Medullary hypoxic damage is believed to give rise to acute kidney injury, which is a prevalent complication of cardiac surgery performed on cardiopulmonary bypass (CPB). To determine the mechanisms that could lead to medullary hypoxia during CPB in the rat kidney, we developed a mathematical model which incorporates (i) autoregulation of renal blood flow and glomerular filtration rate, (ii) detailed oxygen transport and utilization in the renal medulla, and (iii) oxygen transport along the ureter. Within the outer medulla, the lowest interstitial tissue PO2, which is an indicator of renal hypoxia, is predicted near the thick ascending limbs. Interstitial tissue PO2 exhibits a general decrease along the inner medullary axis, but urine PO2 increases significantly along the ureter. Thus, bladder urinary PO2 is predicted to be substantially higher than medullary PO2. The model is used to identify the phase of cardiac surgery performed on CPB that is associated with the highest risk for hypoxic kidney injury. Simulation results indicate that the outer medulla’s vulnerability to hypoxic injury depends, in part, on the extent to which medullary blood flow is autoregulated. With imperfect medullary blood flow autoregulation, the model predicts that the rewarming phase of CPB, in which medullary blood flow is low but medullary oxygen consumption remains high, is the phase in which the kidney is most likely to suffer hypoxic injury.