At the risk of repeating what may already have been said, a few thoughts.
If the pivot is subject to high loads, as it would be on a Moto Cross bike; the material ought to be hardened, (Probably case hardening would suffice. You can buy case hardening compounds for home use. You will need a fairly potent blowtorch. S W M B O will be unlikely to approve use of the oven or gas rings on the cooker for heating to red heat!).
The original bolt was washer faced, so with a Milling attachment, you could start with bar the diameter of the original "washer". You then mill off each side an amount equal to half the difference between the Washer diameter and the Across Flats size of the original hexagon, indexing and repeating until you have a replica hexagon. You will have an end mill in the chuck, so the workpiece will need to be indexed in the milling vice using a protractor, (if not previously marked out) using each cut as the angular datum. The socket or spanner to be used for tightening makes a useful gauge, but don't forget to deburr and very slightly break the corners of the job before checking with the "gauge".
The suggestion to thread both ends, and to use nuts and washers seems to be a good one, if feasible. As is to use castellated nuts and cross drill and split pin, (or use Nyloc nuts on longer threads . Nylon is hygroscopic, so eventually the nylon will likely cause rusting of the threads under it , unless waterproffed with a fingerful or so of grease, afterwards)
For lubrication, I would advocate drilling and tapping one end for a grease nipple, and cross drilling, (at both ends if need be) to meet the axial drilling, so as to take lubricant into the bearing areas. Don't make the drillings too small, 4mm is less likely to clog than 3, but don't go to large and weaken the pivot! The grease oozing out at each end will also waterproof the assembly, as well as reducing wear.
Hope this is some help, if only food for thought
Howard