The lungs have no skeletal muscles of their own. The work of breathing is done by the diaphragm, the muscles between the ribs (intercostal muscles), the muscles in the neck, and the abdominal muscles.

The diaphragm, a dome-shaped sheet of muscle that separates the chest cavity from the abdomen, is the most important muscle used for breathing in (called inhalation or inspiration). The diaphragm is attached to the base of the sternum, the lower parts of the rib cage, and the spine. As the diaphragm contracts, it increases the length and diameter of the chest cavity and thus expands the lungs. The intercostal muscles help move the rib cage and thus assist in breathing.

The process of breathing out (called exhalation or expiration) is usually passive when a person is not exercising. The elasticity of the lungs and chest wall, which are actively stretched during inhalation, causes them to return to their resting shape and to expel air out of the lungs when inspiratory muscles are relaxed. Therefore, when a person is at rest, no effort is needed to breathe out. During vigorous exercise, however, a number of muscles participate in exhalation. The abdominal muscles are the most important of these. Abdominal muscles contract, raise abdominal pressure, and push a relaxed diaphragm against the lungs, causing air to be pushed out.

The muscles used in breathing can contract only if the nerves connecting them to the brain are intact. In some neck and back injuries, the spinal cord can be severed, which breaks the nervous system connection between the brain and the muscles, and the person will die unless artificially ventilated.