It was in progress (and probably still is), probably on Archive of Our Own.
It's an AU which ignores the Thor and Avengers Movies, Thor had gotten sick/injured and the most effective cure was a jotun horn.
Odin decides to have Loki kidnapped and kept in the dungeons so the healers can have the horn to cure Thor.
Loki didn't know who had him imprisoned, maybe Thor later found out but i'm not sure.
Thanks in advance to anybody to tries or manages to find the fic.