Grain boundaries and microstructures of ultrananocrystalline diamond (UNCD) films are engineered at nanoscale by controlling the substrate temperature (TS) and/or by introducing H2 in the commonly used Ar/CH4 deposition plasma in a microwave plasma enhanced chemical vapor deposition system. A model for the grain growth is proposed. The films deposited at low TS consist of random/spherical shaped UNCD grains with well-defined grain boundaries. On increasing TS, the adhering efficiency of CH radical onto diamond lattice drops and trans-polyacetylene (t-PA) encapsulating the nanosize diamond clusters break due to hydrogen abstraction activated, rendering the diamond phase less passivated. This leads to the C2 radical further attaching to the diamond lattice, resulting in the modification of grain boundaries and promoting larger sized clustered grains with a complicated defect structure. Introduction of H2 in the plasma at low TS gives rise to elongated clustered grains that is attributed to the presence of atomic hydrogen in the plasma, preferentially etching out the t-PA attached to nanosized diamond clusters. On the basis of this model a technologically important functional property, namely tribology of UNCD films, is studied. A low friction of 0.015 is measured for the film when ultranano grains are formed, which consist of large fractions of grain boundary components of sp(2)/a-C and t-PA phases. The grain boundary component consists of large amounts of hydroxylic and carboxylic functional groups which passivates the covalent carbon dangling bonds, hence low friction coefficient. The improved tribological properties of films can make it a promising candidate for various applications, mainly in micro/nanoelectro mechanical system (M/NEMS), where low friction is required for high efficiency operation of devices.