A mechanism put forward by the Democratic Unionists meant the change could only go through if a sufficient number of both unionist and nationalist MLAs backed it.
Not enough unionists voted yes.
Despite no change in the law, campaigners for change have hailed the result as a symbolic victory.
For the first time ever a slim overall majority (50.5%) voted in favour. This was the fifth time the issue has been voted on in the Assembly.
The vast majority of church groups oppose any change. Ahead of Monday's vote, Catholic bishops in Northern Ireland issued an open letter warning against a yes vote.
"Those who vote in favour of this motion have no way of knowing what the full consequences of such a vote will be," they said.
"The truth about marriage derives from its intrinsic nature as a relationship based on the complementarity of a man and woman and the unique capacity of this relationship alone to generate new life. This truth does not change with the shifting tides of historical custom or popular opinion."
A number of same-sex couples are currently seeking to overturn the Assembly's ban in the courts.
In the summer about 20,000 people marched in Belfast city centre demanding a law change.
Christian charity CARE has responded to the vote describing it as a "sad day for supporters of traditional marriage".
CEO Nola Leach said: "The sustained pressure of repeated attempts to change the law in Northern Ireland clearly told in the outcome of this debate.
"The biblical teaching is clear that marriage is a life-long commitment between one man and one woman.
"Just because the rest of the United Kingdom has introduced same-sex marriage does not automatically mean Northern Ireland should follow suit.
"With elections looming next May, more effort must be put in to affirm the mutual benefits of biblical marriage within the wider society."