Impaired cognitive flexibility has been repeatedly demonstrated in autism spectrum disorder (ASD). There is strong evidence for genetic involvement in ASD. First-degree relatives of individuals with ASD may show mild deficits in cognitive inflexibility. The present study investigated cognitive flexibility and its neuroelectrophysiological mechanisms in first-degree relatives of individuals with ASD to assess its potential familiality. Forty-five biological parents of individuals/children with ASD (pASD) and thirty-one biological parents of typically developing individuals/children (pTD), matched by gender, age, and IQ, were enrolled. The broad autism phenotype questionnaire (BAPQ) and cognitive flexibility inventory (CFI) were used to quantitatively assess autistic traits and cognitive flexibility in daily life, respectively. The task-switching paradigm was used to evaluate the behavioral flexibility in a structured assessment situation. Event-related potentials (ERPs) induced by this paradigm were also collected. Results showed that compared with the pTD group, the pASD group had lower CFI scores (t = −2.756, p < 0.01), while both groups showed an equivalent “switch cost” in the task-switching task (p > 0.05). Compared with the pTD group, the pASD group induced greater N2 amplitude at F3, F4, Fz, and C4 (F = 3.223, p < 0.05), while P3 amplitude and latency did not differ between the two groups. In addition, there was a significant negative correlation between the CFI total scores and BAPQ total scores in the pASD group (r = −0.734, p < 0.01). After controlling for age and IQ, the N2 amplitude in the frontal lobe of pASD was negatively correlated with the CFI total scores under the repetition sequence (r = −0.304, p = 0.053). These results indicated that pASD had deficit in cognitive flexibility at the self-reported and neurological levels. The cognitive flexibility difficulties of parents of children with ASD were related to autistic traits. These findings support that cognitive flexibility is most likely a neurocognitive endophenotype of ASD, which is worthy of further investigation.