To frame a fireplace, you need to decide on the layout, build the front wall with a rough opening and build a ceiling and floor in the walls where the unit sits. The framing of the fireplace is common when using electric or gas fireplaces.
You must decide on the layout that you want the fireplace to take. That involves its starting point and the height. These are important because they determine the finishing materials that you will use next to the fireplace.
Building a front wall with a rough opening is like building a standard window in a wall. The fireplace should have a header above it because it helps in transferring load in the opening from above. How you want to finish the fireplace is what determines its height. For example, if there is a 12-inch tile around the rough opening, the fireplace unit should be 12 inches, or 24 inches or 36 inches above the ground for the finishing to take place smoother and faster.
Once you build the basic frame around the fireplace, you must build a ceiling and floor on the walls of where the unit sits. You should close the ceiling, and you can do that by framing it with 2x4 knee walls and then sheeting it with 3/4 inches of what can cover the walls.