Odd shaped holes -square, hex, etc- are usually accomplished with a broach.
An expensive tool to buy for only a single hole, but maybe you could find a local small machine shop to do it.
A more advanced way would be with EDM machining, something which is in the reach of hobbyists if you make your own (it isn't that hard to do it on a workable scale, try an Internet search). Again, you might find a small machine shop with the equipment to do it.
There's also the possibility of finding with a hex hole already in the end of it -maybe some kind of drive shaft- and using that.
Depending on the size and depth you need, you also might be able to drill and thread the end for an Allen head set screw and solder or braze that in place.