Heat oil in a Dutch oven or heavy pot over medium heat; cook pork in oil until evenly browned on all sides, about 15 minutes. Add beer.
Cover Dutch oven and bake in the preheated oven until pork is very tender, about 2 hours. Shred pork with a fork and transfer Dutch oven back to the stove top; stir in onion.
Cook and stir over medium heat until onion is browned, about 15 minutes. Season with salt and pepper.