SiCN and SiC nanopowders were prepared by infrared laser pyrolysis of gaseous precursors starting from a SiH4C2H2NH3 gas mixture. The SiCN powders were composed of an amorphous phase ascribed to the ternary compound with a β-SiC crystalline phase, while the SiC powders consisted of β phase only. The chemical bonding and the local atomic order in the SiCN powders are much more complicated than those of pure SiCSi3N4 mixtures and are strongly dependent on the variation in the initial gas composition. The average grain size was estimated from X-raydiffraction (XRD) patterns and atomic force microscopy (AFM). The UV-VIS transmittance data were used for the bandgap determination in these new materials. Absorption studies suggested that the direct energy gap is more favourable in SiCN and SiC nanoparticles and is blueshifted with regard to the crystalline bulk (SiC). The change of type of band-to-band transition in SiC nanopowders, due to the size effects, and increasing of the energy gap value in SiCN powders with different local atomic arrangement, makes them attractive for blue-UV optoelectronic applications.