Ostojić graduated from the Split Faculty of Law in 1988.[1] He held various positions in Split-based companies, and became involved in politics in 1990 when he joined SDP. Between 2001 and 2004 he served as assistant to Interior Minister Šime Lučin during Prime Minister Ivica Račan's government and held the post of Director of Police.[1]
Before becoming government minister he served one term as MP in the 6th Sabor from 2007 to 2011 where he chaired the parliamentary committee for internal affairs and national security.[1] During this time he also ran for mayor of Split in the 2009 local elections but finished runner-up with 34.7 percent of the vote, behind independent Željko Kerum.