Introduction: Costal diaphragm electromyography (EMG) remains unpopular due to the risk of pneumothorax. In this study we assessed the safety of the "trans-intercostal" method of diaphragm EMG using B-mode ultrasound. Methods: Twenty healthy subjects participated in this investigation. The diaphragm and the lung were visualized in the most distal intercostal space (dICS) with ultrasound. The risk of pneumothorax was assessed at the mid-clavicular, anterior, and mid-axillary levels, during normal and deep breathing, in supine and upright postures. Results: The dICS at the anterior axillary level was the safest landmark for diaphragm EMG during normal breathing, with the subject supine. The mid-clavicular level is the least optimal location for EMG. The upright position and deep breaths increase the risk of pneumothorax. Conclusions: The safety of the trans-intercostal method of diaphragm EMG depends on the anatomic level chosen to insert the needle, patient position, and breathing pattern. Hence, we have developed a safety algorithm for electromyographers.