Flexor digitorum profundus, along with flexor digitorum superficialis have long tendons that run down the arm and through the carpal tunnel and attach to the palmar side of the phalanges of the fingers. This muscle originates from the anterior side of the ulna.
Flexor digitorum profundus lies deep to superficialis, but it attaches more distally. To get around this problem profundus's tendons go through the tendons of superficialis, and end up attaching to the distal phalanx.
It is one of two flexor muscles that is not exclusively supplied by the median nerve (the other is flexor carpi ulnaris).