Objective. Optically pumped magnetometers (OPMs) are recently developed magnetocardiography (MCG) sensors that can detect cardiac diseases. This is of great clinical significance for detecting acute myocardial infarction (AMI) and premature ventricular contractions (PVC). This study investigates the use of an array of OPMs to detect heart disease in animals.Approach.An array of OPMs was used to detect the MCG of AMI and PVC in dogs. We used four dogs in this study, and models of AMI with different degrees of severity were established by ligating the middle and proximal segments of the left anterior descending coronary artery. The dogs had PVC at the time of AMI. Continuous MCG time series with corresponding electrocardiograms (ECGs) and average MCG for each dog in different states are presented. The MCG features were extracted from the MCG butterfly diagram, magnetic field map, and pseudo current density map. The MCG features were used to quantify and compare with the gold-standard ECG measures.Main results.The results show that MCG features can accurately distinguish different states of dogs. That is, an array of OPMs can effectively detect AMI and PVC in dogs.Significance.We conclude that the array of OPMs can detect heart diseases in animals. Moreover, OPMs can complement or even replace superconducting quantum interference devices for MCG measurement in animals and diagnosis of human heart diseases in the future.