Compact wavelength-sensitive optical components are desirable for optical information processing and communication in photonic integrated system. In this work, optical waveguiding along single composition-graded CdS(x)Se(1-x) nanowires were systematically investigated. Under a focused laser excitation, the excited light can be guided passively along the bandgap-increased direction of the nanowire, keeping the photonic energy of the guided light almost unchanged during the whole propagation. In comparison, the excited light is guided actively through incessantly repeated band-to-band reabsorption and re-emitting processes along the bandgap-decreased direction, resulting in a gradual wavelength conversion during propagation. On the basis of this wavelength-converted waveguiding, a concept of nanoscale wavelength splitter is demonstrated by assembling a graded nanowire with several composition-uniform nanowires into branched nanowire structure. Our study indicates that composition-graded semiconductor nanowires would open new exciting opportunities in developing new wavelength-sensitive optical components for integrated nanophotonic devices.