Nanodiamonds modified with hydrocarbons exhibit colloidal stability in hydrophobic and non-polar solvents including lithium ion battery electrolytes. Hydrocarbon modified nanodiamonds have also been shown to suppress the dendrite formation in lithium ion batteries.