It's a long curvy road as there are so many objections both thematically and mechanically, however that being said, all of those objections only add to the tragedy of a truly motivated individual, so my response to your question comes in two parts, one being the thematic and the other mechanical, and to all would be nay sayers hold onto your hats because, yes you can have a Warforged become a Lich technically, but it's how you get there, because it's not a direct root by any means.
So one question presented in this thread, is why as Warforged are immortal, which there is an argument from a mechanical perspective but from the thematic as created creatures, self awareness leads to doubt, and from the Warforged's own personal perspective I could definitely understand the concept of not seeing their grand designs through when their "battery" finally runs out of juice (I know they don't have batteries, it's just a humorous way to explain their expiration date or the concept of), yes it's a philosophical quandary, but so is the concept of being a flesh creature and sleeping (potentially dreaming), eating, "feeling" etc. all alien concepts to a creature that honestly may not understand the small eccentricities that make mortals mortal, so trying to understand death is another concept that could terrify a Warforged, or intrigue them to a point of insanity, there's so much flavor and potential for roll play, it's a DM's playground of delights; just imagine a series of journals (found all over your world) taken from the Warforged's experiences with death, like bread crumbs leading players to a grand battle of terror and madness, with a being that has literally tried understanding death...
As for the mechanical aspects of this we're going to play in the wheelhouse of this concept, our Warforged Wizard would need True Polymorph to turn into a mortal of whatever kind they want, a already prepared Glyph of Warding with Clone spell stored and there you have it, a Warforged that can by RAW become a Lich; yes I understand it's a little manipulative but works for both the thematic but also the mechanical; just to break it down, have your Warforged cast Glyph of Warding on a random book, storing the spell Clone, then cast True Polymorph to turn into a humanoid of whatever variety you like Concentrate for 1 hour, you're now whatever you want to be, then activate the Glyph creating a clone of yourself as that humanoid creature (btw if you're asking why no matter how "permanent" you can still be dispelled, we're working towards immorality which is a fickled process) (and yes the Clone will be that creature type, not something polymorphed), wait 120 days while your clone bakes and simmers (and for thematic purposes turn yourself back to a Warforged the next day) once you clone is done (I would set up another clone of your Warforged and that humanoid form btw just for security purposes but that's me) kill yourself pop out as your humanoid clone (hang your Warforged dead body up as a macabre scarecrow or trophy behind your throne, if you don't have a throne make your Warforged carcass into your throne, really go nuts, all to really mess with people's heads, remember if they've read the journals, they know what/who you're sitting on), take your humanoid clone and make yourself a Lich, and there you go, a long deranged way to make a Warforged into a Lich, enjoy.