Lesnar was last in negotiations with the UFC in 2015 when his WWE contract was expiring ahead of WrestleMania 31. Ultimately, Lesnar ended up staying with the WWE on a three year contract, which doesn't expire until after WrestleMania in 2018.
According to sources, Lesnar has been training for an MMA return since after this year's WrestleMania. He inexplicably appeared on UFC's roster during that period, as well. WWE's lawyers actually called the UFC about the profile appearing on their page.
The WWE hasn't traditionally allowed any of their Superstars to compete in MMA fights while under contract, something that Alberto Del Rio had to stop doing when he signed with the company. Brock Lesnar has been the exception to many rules in the WWE, however.
Lesnar last competed in the UFC in 2011, losing a fight to Alistair Overeem via TKO. Overeem would fail a drug test several months later. Lesnar still shares the record for most successful consecutive UFC Heavyweight title defenses, with two.
It's worth keeping in mind that this has happened before, as Lesnar rumors were 'coincidentally' stirring around the huge UFC 168 PPV.
Generally, a fighter must give USADA four months' notice before un-retiring and taking a fight. The UFC is able to waive that four month period for a returning fighter, however.