Dismantle the crib, separating the footboard and headboard from the two sides. Use appropriate tools such as a screwdriver or drill to remove the hardware in order to preserve the different sections.
Measure the width of the twin bed and the width of the crib’s headboard and side panel. Use this to determine which section to use for the twin bed. Place the headboard and footboard next to one another to form an extra-wide headboard. Use one side panel for a headboard with a slatted look. Use either the headboard or footboard on its own, if it's wide enough to span the twin bed.
Paint the piece or pieces you plan to use for the headboard. Leave it in its original form if the crib section is in good shape.
Locate studs behind the twin bed and install two hooks at the height you desire the headboard. Attach a “D” ring on either side of the crib section you’re using by screwing them in at points that match the spacing of the hooks. Slip the “D” rings over the hooks to attach the headboard to the wall, and push the bed against the wall beneath it.