Graphene nanoribbons (GNRs) and carbon nanotubes (CNTs), two representative one-dimensional (1D) graphitic materials, have attracted tremendous research interests due to their promising applications for future high-performance nanoelectronics. Although various methods have been developed for fabrication of GNRs or CNTs, a unified method allowing controllable synthesis of both of them, as well as their heterojunctions, which could largely benefit their nano-electronic applications, is still lacking. Here, we report on a generic growth of 1D carbon using nanoparticles catalyzed chemical vapor deposition (CVD) on atomically flat hexagonal boron nitride (h-BN) substrates. Relative ratio of the yielded GNRs and CNTs is able to be arbitrarily tuned by varying the growth temperature or feeding gas pressures. The tunability of the generic growth is quantitatively explained by a competing nucleation theory: nucleation into either GNRs or CNTs by the catalysts is determined by the free energy of their formation, which is controlled by the growth conditions. Under the guidance of the theory, we further realized growth of GNR/CNT intramolecular junctions through changing H-2 partial pressure during a single growth process. Our study provides not only a universal and controllable method for growing 1D carbon nanostructures, but also a deep understanding of their growth mechanism, which would largely benefit future carbon-based electronics and optoelectronics.