The only good way to machine embroider a baseball cap is to use a hoop or hoop attachment designed specifically for the task and the machine that you use. The bill of the baseball cap must be contended with and regular machine embroidery hoops do not account for it. While regular hoops can be used to add embroidery to the sides and backs of caps, you will need to invest in the proper hat hoop or attachment for your machine.
Upload the embroidery image into your machine and set it. Baseball-hat designs above the bill should not be more than 3 inches wide.
Prepare the hat hoop or hat attachment according to the manufacturer's specific instructions. Stabiliser is generally hooped at this point for most home-embroidery machines. Check directions for the particular machine uses. Directions vary according to the maker of the machine and the purpose of the machine. A home sewing/embroidery combo machine will not have the same instructions as a six-needle, semi-commercial version.
Add the hat to the hoop or hat attachment and insert it properly into the machine.
Thread the machine's upper threads and be sure the bobbin is in place.
Start the machine and embroider the image on the hat.
Remove the hat from the hoop/attachment when the image has been embroidered.
Snip loose threads and trim away any stabiliser from the back side.
If your hooping method does not require stabiliser, add a piece of sticky stabiliser underneath the embroidery area. Tear away excess when complete. Your hat may not need stabiliser at all. Many have an extra lining in the front area specifically for machine embroidery. If you plan to embroider hats, invest in the proper equipment to do so.
Before embroidering, be sure your image will not stitch upside down on the hat. You may have to rotate the image. Never place your hands near the machine needle as it is stitching.