Altered heart rate (HR) and heart rate variability (HRV) are common observations in psychiatric disorders. Yet, few studies have examined these cardiac measures in obsessive-compulsive disorder (OCD). The current study aimed to investigate HR and HRV, indexed by the root mean square of successive differences (RMSSD) and further time domain indices, as putative biological characteristics of OCD. Electrocardiogram was recorded during a five-minute resting state. Group differences between patients with OCD (n = 96), healthy participants (n = 112), and unaffected first-degree relatives of patients with OCD (n = 47) were analyzed. As potential moderators of group differences, we examined the influence of age and medication, respectively. As results indicated, patients with OCD showed higher HR and lower HRV compared to healthy participants. These group differences were not moderated by age. Importantly, subgroup analyses showed that only medicated patients displayed lower HRV compared to healthy individuals, while HR alterations were evident in unmedicated patients. Regarding unaffected first-degree relatives, group differences in HRV remained at trend level. Further, an age-moderated group differentiation showed that higher HRV distinguished relatives from healthy individuals in young adulthood, whereas at higher age lower HRV was indicative of relatives. Both the role of familial risk and medication in HRV alterations need further elucidation. Pending future studies, alterations in HR and potentially HRV might serve as useful indices to characterize the pathophysiology of OCD.