The impedance spectroscopy measurements were used to investigate the separated contributions of diamond grains and grain boundaries (GBs), giving an insight of p-type to ntype conductivity conversion in O + -implanted ultrananocrystalline diamond (UNCD) films. It is found that both diamond grains and GBs promote the conductivity in O + -implanted UNCD films, in which GBs make at least half contribution. The p-type conductivity in O + -implanted samples is a result of H-terminated diamond grains, while n-type conductive samples is closely correlated to O-terminated O + -implanted diamond grains and GBs in the films. The results also suggest that low resistance of GBs is preferable to obtain high mobility n-type conductive UNCD film.