In The Importance of Being Earnest, the character John Worthing creates a false identity for himself known as Earnest. While John is dishonest and deceitful when he is Earnest he is good (or at least has a better reputation). As Earnest, he gets engaged to a woman and he decided to tell her he is actually John Worthing and stop the whole charade. However, before John makes any confession, his fiancé tells him that she is in love with him mainly because his first name is 'Earnest' which, of course, causes problems for him. At the end, he decides to become Earnest wholly, giving up the bad things he does in his life and realises the importance of being Earnest (both the person, and the quality. Get it? It's very punny!).
Meanwhile, in Jekyll and Hyde, Henry Jekyll begins to feel troubled by inner turmoil, or, more specifically, bad inclinations and good inclinations. As such, Henry creates a potion which he hopes will supress his badness. Unfortunately, the potion brings into existence Mr Hyde, a wholly evil person. Hyde begins to become the dominant persona and Jekyll struggles to 'come back' after Hyde has taken over. In the end, he either kills himself/both of them or becomes wholly Hyde.
So look at the two stories like this: In Earnest, a bad man creates a good persona for himself and in the end decides it would be best to be solely him and gives up his bad life. In Jekyll and Hyde, a good man (or, at least, an average man) creates a bad persona for himself (inadvertently) by a potion. In the end, the new person takes over and he becomes only Hyde. In both cases, the original person is gone and the new persona becomes dominant, and in both cases, it seems to be the bad person making the decision at the end. It just seems that each story is the reverse of the other. I thought that was a little interesting.