Abnormal heart rate variability (HRV) is commonly observed in cancer patients who have undergone targeted therapy and/or surgery, yet the effects of cancer itself on cardiac function remain underexplored. Specifically, there is limited knowledge about sex‐specific manifestations of HRV in cancer patients. Transgenic mouse models are widely used to study different types of cancer. Here, we aimed to investigate the sex‐specific effects of cancer on cardiac function using transgenic mouse models of pancreatic and liver cancers. This study used male and female transgenic mice with cancer and wild‐type controls. Cardiac function was assessed by recording electrocardiograms in conscious mice. RR intervals were detected to determine HRV using time and frequency domain analyses. Histological analysis with Masson's trichrome staining was performed to determine structural changes. In females, increased HRV was observed in both pancreatic and liver cancer‐bearing mice. In contrast, in males, increased HRV was observed only in the liver cancer group. Male pancreatic cancer mice demonstrated autonomic balance shift showing an increase in parasympathetic to sympathetic tone. The heart rate (HR) was higher in control and liver cancer male mice groups than in females. Histological analysis did not show significant sex differences but suggested a higher degree of remodeling in liver cancer mice than in control, specifically in the right atrium and left ventricle. This study revealed sex differences in cancer's HR modulation. Specifically, female cancer mice had lower median HR and higher HRV. These findings indicate that sex must be considered when using HRV as a cancer biomarker.