Recently accomplished this on a hickory ramrod for an English style pistol, after much experimenting. Use both a stain and a dye.
Black stain from local paint or hardware store will stain down inside the grain, but rubs right off the surface. Then a dye like Behlen Solar-lux Jet Black dye for the surface. Once dry, you are good to apply finish.