Anatomy
The ulnar nerve arises from the medial fascicle of the brachial plexus, most commonly from roots C8–T1. It is an important nerve of the medial part of the forearm and hand, particularly for the hypothenar muscles, interosseous muscles, and sensation of the ulnar part of the hand. Cross-sectional anatomy is essential for proper interpretation of the sonographic image, as ultrasound follows the nerve at individual anatomical levels. The most clinically significant areas are the ulnar groove / cubital tunnel and Guyon's canal.

Axilla
In the axilla, the ulnar nerve lies as one of the terminal branches of the brachial plexus medially to posteromedially from the axillary artery. In this area, its branches do not yet arise and the nerve can be traced in proximity to other major nerves of the upper limb.

Figure 1: Cross-section of the axilla. D – m. deltoideus, PM – m. pectoralis major, LHBB – caput longum m. biceps brachii, SHBB – caput breve m. biceps brachii, CB – m. coracobrachialis, mc – n. musculocutaneus, M – n. medianus, U – n. ulnaris, R – n. radialis, Tmaj – m. teres major, TLa – caput laterale m. triceps brachii, TLo – caput longum m. triceps brachii, H – humerus.
Arm
In the arm, the ulnar nerve initially runs together with the neurovascular bundle, medial to the brachial artery. In the middle portion of the arm, it perforates the medial intermuscular septum of the arm and passes more dorsally toward the medial epicondyle. In the distal portion of the arm, it is in close relationship to the medial head of the triceps brachii muscle and may pass under a fascial arch referred to as the arcade of Struthers.
In the proximal part of the brachium, the nerve is medial to the vascular bundle, distally it curves dorsally over the medial intermuscular septum - which is one of the sites of potential nerve compression.

Figure 2: Cross-section of the arm. B – m. biceps brachii, Br – m. brachialis, CB – m. coracobrachialis, H – humerus, TLa – caput laterale m. triceps brachii, TM – caput mediale m. triceps brachii, TLo – caput longum m. triceps brachii, R – n. radialis, M – n. medianus, U – n. ulnaris.
Elbow
In the elbow region, the n. ulnaris runs behind the medial epicondyle of the humerus in the sulcus n. ulnaris and then enters the cubital tunnel. This is bridged by a fibrous band between both heads of the m. flexor carpi ulnaris, known as Osborne's ligament. The nerve is very superficial and vulnerable here. This area is precisely the most common site of ulnar nerve entrapment neuropathy.
During sonography, it is advisable to examine the nerve in cross-section between the medial epicondyle and olecranon and dynamically assess its behavior during elbow flexion, as subluxation or luxation of the nerve may occur in some patients.

Figure 3: Cross-section of the elbow. Br – m. brachioradialis, ECRL – m. extensor carpi radialis longus, ECRB – m. extensor carpi radialis brevis, B – tendon of m. biceps brachii, S – r. superficialis n. radialis, P – r. profundus n. radialis (n. interosseus posterior), M – n. medianus, PT – m. pronator teres, U – n. ulnaris, FCU – m. flexor carpi ulnaris, A – m. anconeus.
Forearm
After passing through the elbow, the n. ulnaris enters between the humeral and ulnar heads of the m. flexor carpi ulnaris. It then continues along the forearm between the m. flexor carpi ulnaris and m. flexor digitorum profundus. In the proximal portion it lies deeper under the FCU, more distally it comes into relationship with the a. ulnaris, which it accompanies in the forearm.
In the forearm it gives off its main branches:
rami musculares for the m. flexor carpi ulnaris and ulnar half of the m. flexor digitorum profundus
ramus cutaneus palmaris for cutaneous sensation of the ulnar portion of the palm
ramus dorsalis n. ulnaris, which branches off in the distal third of the forearm and curves dorsally to the dorsum of the hand

Figure 4: Cross-section of the forearm. Br – m. brachioradialis, ECRL – m. extensor carpi radialis longus, ECRB – m. extensor carpi radialis brevis, EDC – m. extensor digitorum communis, EDM – m. extensor digiti minimi, ECU – m. extensor carpi ulnaris, AbPL – m. abductor pollicis longus, EPB – m. extensor pollicis brevis, EPL – m. extensor pollicis longus, FCR – m. flexor carpi radialis, PL – m. palmaris longus, FDS – m. flexor digitorum superficialis, FPL – m. flexor pollicis longus, FDP – m. flexor digitorum profundus, FCU – m. flexor carpi ulnaris, M – n. medianus, U (nerve) – n. ulnaris, Rs – r. superficialis n. radialis, Rp – r. profundus n. radialis (n. interosseus posterior), AIN – n. interosseus anterior, R – radius, U (bone) – ulna.
Wrist
In the wrist region, the n. ulnaris enters the hand above the flexor retinaculum, not through the carpal tunnel. It runs radial to the os pisiforme in Guyon's canal together with the a. ulnaris. In the canal, it divides into the ramus superficialis and ramus profundus. The superficial branch is predominantly sensory, while the deep branch is motor and extends to the hypothenar and deep muscles of the hand. The n. ulnaris does not pass through the carpal tunnel, but through Guyon's canal. This is a fundamental difference from the n. medianus.

Figure 5: Cross-section of the wrist. FCR – m. flexor carpi radialis, M – n. medianus, U – n. ulnaris, P – os pisiforme, H – os hamatum, C – os capitatum, S – os scaphoideum
Practical orientation landmarks for US
in the axilla: medially to posteromedially from the a. axillaris
in the brachium: medially from the a. brachialis, then through the septum intermusculare mediale dorsally
in the cubita: behind the medial epicondyle in the sulcus n. ulnaris / cubital tunnel
on the forearm: between the heads of FCU, further between FCU and FDP
distally on the forearm: accompanying the a. ulnaris
in the wrist: in Guyon's canal, radially from the os pisiforme