When I started shooting a flintlock I had to learn not to anticipate the shot. What has worked for me for many years is that every time I step up to shoot offhand, right after I have my rifle on target and just before I shoot, I tell myself "this shot will probably be a misfire, so focus on holding the rifle steady and keep it on target." It sounds funny, but it has worked well for me to force me to think about follow through on every shot. When I do get a misfire, 99% of the time my barrel doesn't move off target. Exercising your arms and upper body will also go a long way to keeping your rifle steady in offhand shooting. I sight in all my rifles offhand because that's how I always shoot them. If I go to a rest they shoot to a noticeably different point of aim.
Practice, practice, practice!
Practice, practice, practice!