The 17-year-old attacking midfielder will cost Barca an initial 2.2million euros (£1.8m) with add-ons depending on his achievements at the Nou Camp.
Halilovic, who became Croatia's youngest player when he made his international debut against Portugal in a friendly last June, has penned a five-year contract with the Spanish champions and will initially link up with their reserve side.
Halilovic told Barca's official website: "I'm delighted and it's difficult to find the words to describe how I feel.
"Many thanks to Dinamo, who will always remain my first love and the club who made my dreams come true.
"Of course, Barcelona is something special, I've loved the club since I was small and I feel honoured to have the opportunity to play for Barca.
"Before everything, I want to win the double with Dinamo and then focus on my new club."
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball