The first time I heard about legislation banning "homosexual propaganda", I thought it was funny. Quaint. I thought the last time anyone had used those words in earnest I had been a kid and my girlfriend hadn't been born yet. Whatever they meant when they enacted laws against "homosexual propaganda" in the small towns of Ryazan or Kostroma, it could not have anything to do with reality, me or the present day. This was a bit less than two years ago.

What woke me up was a friend who messaged me on Facebook: "I am worried about how this might impact you and other LGBT people with families." This was enough to get my imagination working. Whatever they meant by "homosexual propaganda", I probably did it. I had two kids and a third on the way (my girlfriend was pregnant), which would mean I probably did it in front of minors. And this, in turn, meant the laws could in fact apply to me. First, I would be hauled in for administrative offences and fined and then, inevitably, social services would get involved.

That was enough to get me to read the legislation, which by now had been passed in about 10 towns and was about to become law in St Petersburg, the second-largest city in the country. Here is what I read: homosexual propaganda was defined as "the purposeful and uncontrolled distribution of information that can harm the spiritual or physical health of a minor, including forming the erroneous impression of the social equality of traditional and non-traditional marital relations".

Russia has a lot of poorly written laws and regulations that contradict its own constitution, but this one was different. Like other contemporary laws, it was so vaguely worded that it encouraged corruption and extortion (fines for "homosexual propaganda" are backbreaking) and made selective enforcement inevitable. But it also did something that had never been done in Russian law before: it enshrined second-class citizenship for LGBT people. Think about it: it made it an offence to claim social equality.

St Petersburg passed the law in March 2012. I no longer thought it was funny. I actually choked up when I saw the news item about the bill being proposed at the federal level. My girlfriend had recently had a baby and this, among other things, meant we needed to sell our tiny cars and trade up to something that accommodated three kids and a pram. I asked her: "Are we doing this or do we just need to get out of the country?" We decided we were doing it. We are fighters, not quitters.

So I launched the pink-triangle campaign. I went on TVRain, independent internet and satellite-based television and recorded a segment showing pictures of my family and explaining how the law would make it a crime to say my family was equal to other families. I explained the history of the pink triangle. I called on people who did not want to see fascism in Russia to put on pink triangles.

Though I have always been publicly out, I had never done what I did then – talked about my family and asked to be seen as a lesbian rather than a journalist first. It seemed to work beautifully. People wrote to me and came up to me in the street. I had had 6,000 pink triangles printed up and I got rid of most of them within a few weeks.

The public chamber, an extraparliamentary body formed by the Kremlin, scheduled a hearing on the legislation. I testified, as did a number of human rights activists I respected. The chair read out a draft resolution. I also received private assurances from highly placed officials present that the legislation would never make it to the parliament's floor.

That was a year ago. The public chamber's resolution never materialised. In January 2013, the Duma passed the bill in first reading. The protesters who came to the parliament building that day were beaten up. There had been anti-gay violence in Russia before, most notably when a group of activists had attempted to hold a gay pride celebration in Moscow, but never like this: brutal beatings in broad daylight as the police looked on – and eventually detained the protesters, not the attackers.

One of my closest friends took part in the protest at the Duma that day. The following day, he was fired from his job teaching biology at one of the city's better schools. He was eventually reinstated after a public outcry – he was arguably the city's best-known teacher, with his own podcast and television and radio series – but I knew one thing: if he had been a gay man rather than a heterosexual ally, he would never teach in the city again. Oh, and around the same time, Moscow City court banned gay pride celebrations for the next 100 years.

In March, the St Petersburg legislator who had become a spokesman for the law started mentioning me and my "perverted family" in his interviews. I contacted an adoption lawyer asking whether I had reason to worry that social services would go after my family and attempt to remove my oldest son, whom I adopted in 2000. The lawyer wrote back telling me to instruct my son to run if he is approached by strangers and concluding: "The answer to your question is at the airport."

In June, the "homosexual propaganda" bill became federal law. The Duma passed a ban on adoptions by same-sex couples and by single people living in countries where same-sex marriage is legal. The head of the parliamentary committee on the family pledged to create a mechanism for removing children from same-sex families.

Two things happened to me the same month: I was beaten up in front of parliament for the first time and I realised that in all my interactions, including professional ones, I no longer felt I was perceived as a journalist first: I am now a person with a pink triangle.

My family is moving to New York. We have the money and documents needed to do that with relative ease – unlike thousands of other LGBT families and individuals in Russia.