My best guess, based on the shape of the key, is that it was used in a very old-style pin-tumbler sliding bolt, similar to the ancient Egyptian locks.
The only good reference I have to medieval versions of those is from an 1883 edition of
Development and Distribution of Primitive Locks and Keys (by Pitt-Rivers); here's a sample illustration from from that text:

Basically, the key was inserted and lifted: the fingers of the key pushed the pins up to the "shear line", which then allowed the bolt to slide.
Can't guarantee that's what your key was from, but it's a pretty good bet.