Place the bacon in a large, deep skillet, and cook over medium-high heat, turning occasionally, until evenly browned, about 10 minutes. Drain the bacon slices on a paper towel-lined plate, reserving about 1 tablespoon bacon drippings in the skillet. Crumble bacon.
Preheat oven to 275 degrees F (135 degrees C).
Cook and stir the onion in the reserved bacon drippings over medium-high heat until onion has softened and turned translucent, about 5 minutes.
Combine cooked onion, sugar, cider vinegar, relish, pimento peppers, and green beans in a large bowl.
Transfer mixture to a baking dish and cover with aluminum foil.
Bake in the preheated oven until browned, about 1 1/2 hours. Remove foil and stir lightly.
Allow green beans to rest for 15 minutes before topping with crumbled bacon and serving.