Sketch your framing design on a sheet of graph paper, noting the interior fireplace’s relationship to existing walls and ceilings. Note the location of the sole plate and top plate -- these are the 2-by-4s on the floor and ceiling respectively that outline the dimensions of the fireplace frame. Add locations of existing ceiling joists and wall studs as determined with an electronic stud finder so that the outer edges of framing can optimally be nailed into these for good support.
Incorporate in your design the specifications given in the installation instructions for the fireplace insert, including the minimum height, depth and width of the insert opening, minimum chimney height or minimum venting space, as well as any allowances on the sides to accommodate gas supply lines.
Mark the length and width of the overall fireplace framing on the ceiling, on either the ceiling joists if unfinished or on the ceiling drywall, with a carpenter’s pencil. Drop a plumb bob on a string from the corners of the marks on the ceiling to the floor to replicate the framing dimensions.
Cut the top and sole plates from 2-by-4 lumber with a chop saw and lay them on the floor about eight feet apart on their edges. Stack two scrap pieces of 2-by-4s on the floor and measure from the top of the stack to the ceiling to arrive at your stud lengths. Cut four studs: Two will create the ends of the frame and two will go on either side of the insert opening.
Mark the center of the sole plate. Also mark the width of the insert opening, centered on your earlier mark. Lay the studs between the sole and top plates so one is at either end and the others fall just outside your marks for the insert opening. Nail through the top and sole plates into the ends of the studs with a nail gun and 16d nails. Raise the framing vertically and nudge it into place against the marks on the ceiling and the floor.
Test that the frame is vertical with a spirit level. Nail the top plate into the ceiling joists and the bottom plate into the subfloor. Measure from the installed frame to the wall and cut additional sole plates, top plates and studs for the sides of the fireplace. Nail these plates to the ceiling joists and subfloor and the framing stud to a wall stud.
Frame the opening for the fireplace insert as you would a window. Mark the two interior studs in the front of the frame to designate the top and bottom of the insert, keeping the bottom at least as high off the subfloor as any minimum called for by the manufacturer.
Cut a 2-by-4, called the sill plate, to run between the studs at the bottom of the insert opening and nail it in place, long side horizontal. Cut a 2-by-6, called the header, to run between the studs at the top of the insert opening and nail it in place, long edge vertical. Cut partial studs, called cripple studs, spaced evenly between the sill plate and sole plate and the header and top plate, no farther apart than 16 inches on center. Nail these in place, toenailing the studs into the sole and top plates.