Congestive heart failure. When one or both of your heart's lower chambers lose their ability to pump blood effectively — as happens in congestive heart failure — the blood can back up in your legs, ankles and feet, causing edema. Heart failure can also cause swelling in your abdomen. Sometimes it can cause fluid to accumulate in your lungs (pulmonary edema), which can lead to shortness of breath. Cirrhosis. Fluid may accumulate in your abdominal cavity (ascites) and in your legs as a result of liver damage (cirrhosis).