Ebstein anomaly is a rare heart defect that affects the tricuspid valve (one of the heart's four valves). It happens because of a problem with how the valve forms before a baby's birth.