Discharge in liquid is a promising technique to produce nanomaterials by electrode erosion. Although its feasibility was demonstrated in many conditions, the production of nanoalloys by in-liquid discharges remains a challenge. Here, we show that spark discharge in liquid cyclohexane that is in contact with conductive solution, made of a combination of Ni-nitrate and/or Fe-nitrate and/or Co-nitrate, is suitable to produce nanoalloys (<10 nm) of Ni-Fe, Ni-Co, Co-Fe, and Ni-Co-Fe. The nanoparticles are synthesized by the reduction of metal ions during discharge, and they are individually embedded in C-matrix; this latter originates from the decomposition of cyclohexane. The results open novel ways to produce a wide spectrum of nanoalloys; they are needed for many applications, such as in catalysis, plasmonic, and energy conversion.