Melt butter in a skillet over medium heat. Cook and stir onions in melted butter until clear and browned, 10 to 15 minutes; transfer to a slow cooker. Add beef broth, garlic, salt, and black pepper to the slow cooker.
Cook on High for 4 hours or on Low for 8 hours.