Hailey
You are faced with rather a challange if your unable to get to the National Archives at Kew, however, if you were you should consult ADM12/27F. This is an index and digest of naval Courts Martial verdicts for the period 1812-55 that includes a surname index, date of trial, rank and ships name.
There are other Courts Martial records available, but to find out more you should read 'Tracing Your Naval Ancestors' by Bruno Pappalardo.
Assuming you were to find your man, you could then consult his last ship's Muster Book and begin to piece together his naval career.
Martin