I'm traveling with my wife to a vacation on Malaysia with a transit on Dubai. It's a round-trip flight, now I already have to go to Dubai (I'm a UAE resident) after returning from Malaysia, so what if I went in the first flight regularly with my wife, and while returning, when stopping in Dubai, my wife will complete the trip alone, and I will skip the second flight and enter Dubai. Would that cause any trouble for me? Are there are any fees I would pay? I'll not have any bags on the flight.
As nearly always, if you don't show up for any leg, you will lose this leg and all following ones. If this is your last leg, or if you don't care about any further ones one that ticket, nothing worse happens.
Your wife will not be affected - it's a separate ticket (even though under the same booking code); unless you took advantage of some special rebate for buying two tickets together. The airline will not know that you are missing until the plane doors are about to close; and if they really ask her anything when she is already in her seat, she can always claim that you got held up at security, or simply 'couldn't make it', or 'she doesn't know' - she is not legally or contractually required to know where you are.
Note that you will probably not be able to get your luggage out; and it is unclear when your luggage will be available to you and when, it could take days. So check all luggage under her, or at least make sure that her luggage contains everything she wants to have at the end of the trip (so don't check her luggage under your name or such), and you have your stuff you want in your carry-on.
Your luggage should theoretically be removed from the plane when you don't show up, but that might or might not work, so it could be at the start or the end of the location, and it could be days before you get it. Don't check anything to avoid the hassle.
If you start doing this regularly (to save money, google 'Hidden City Ticket'), the airline might throw you out of their frequent flyer program, and may at some point decline to sell you any more tickets. One time though should have no effect (outside of the money you lost)
That's a borderline case and hard to predict unless you plow through the entire "contract of carriage" of the airline and through the exact fare rules of your tickets.
It's possible that you not showing up for the second flight may cancel the entire reservation or the airline may try to get a change fee out of your wife before her allowing to board. At the very last they are going to ask her some questions, if you don't show up at the gate.
Your safest course of action would be to split the reservation, i.e. make sure that both you and your wife have a different confirmation numbers. Then, both reservations are fully decoupled and whatever you do cannot affect your wife's travel. It's a just little harder to manage (seats, check in , etc.) that way.