After his arrival in Walford, AJ's brother Masood (Nitin Ganatra) makes sure he avoids his ex-wife Zainab (Nina Wadia), because she dislikes him. AJ proves to be a bad influence on Masood when they damage Derek Branning's (Jamie Foreman) car with a shopping trolley and AJ is punched by Derek. AJ discovers that Masood and Zainab are divorced and later tells Masood he came to Walford because his wife Aliyah (Ann Wenn) has left him. After Masood inspires AJ with his reunion with Zainab, AJ leaves to reconcile with his own wife. He returns a few weeks later saying that he and Aliyah are divorcing. Zainab contacts Aliyah to try to get her to take AJ back, and AJ says that Aliyah had an affair. Aliyah drops off AJ's belongings and reveals that there was no affair. AJ then explains that he left Aliyah because she wants children and he does not. AJ moves in with Masood and his family. Zainab dislikes his laziness and she becomes annoyed when he brings Roxy Mitchell (Rita Simons) back after a drunken evening. Roxy stays the night but makes it clear that it was a one-off.
AJ gets a job from Phil Mitchell (Steve McFadden) as a mechanic to help the family with their financial problems. He selfishly takes money from the family to buy a motorbike, but then sells it to help pay the mortgage. When Zainab says she will stop interfering in people's lives, AJ uses the opportunity to annoy her. AJ and Aliyah receive their decree nisi. When Zainab has a job interview, AJ tells the interviewer she has short-term memory loss. However, when he apologises via a Post-It note, she returns the apology. AJ supports Masood when his relationship with Zainab ends. When AJ has to look after Masood's young son Kamil Masood (Arian Chikhlia), he admits that he is not good with children, and was scared when Aliyah wanted one, because he feels he cannot look after himself properly, let alone a child. However, he bonds well with his nephew. AJ is offered a job as an assistant manager at a garage in Birmingham. Although he initially wants to turn down the position, he eventually accepts the job offer. Shortly before he leaves Walford, AJ learns that his mother has died. Masood is angry with AJ when he explains that he cannot attend their mother's funeral. AJ then leaves for Birmingham.
Sharma was recommended for the part of AJ by Nitin Ganatra (Masood) after the character was described to him, because producers wanted AJ and Masood to be funny together. The two actors had previously performed in comedy together in short film The Drop, Channel 4's Meet the Magoons and a programme called To Eat with Your Fingers, so Ganatra thought Sharma would be perfect for the role and he was the first person he thought of. Ganatra and the producers went through ideas of how a brother would affect Masood and what their relationship would be. Ganatra explained that he thought Masood only had one brother until he was told about AJ. When Sharma and Ganatra performed a scene together at Sharma's audition, the dialogue came so naturally to them that producers thought they were improvising, but, as Ganatra explained, they "know each other's style [and] have all these shortcuts. It's like having a real brother." Sharma was offered the part immediately after his interview. Sharma added in March 2013: "I've known Nitin for years and he really lobbied for me to get the role of AJ, and as soon as I finished my audition the producers offered me the part and asked if I wanted a cup of tea, to which I replied, 'Yes please, I've waited 20 years for that cup of tea', but it's been really nice to just jump onto a set with someone I've already bonded with—it's like having a pre-built family to bounce off." He had also previously worked with his co-stars Nina Wadia (Zainab) and Marc Elliott (Syed Masood), so felt it was "cool" and "familiar" to work with them. Sharma revealed in an interview with Inside Soap that his own mother always thought he should play Masood's brother after watching EastEnders for many years. The first scene Sharma filmed was with Ganatra on the set outside The Queen Victoria public house, and he found it "really surreal".
The character and Sharma's casting were announced on 1 June 2012. It was reported that AJ arrives in Albert Square hoping to reconnect with Masood and build bridges with his family, then AJ gets himself and Masood in trouble, so Masood wonders if AJ is running away from something. Sharma said "I think it's a really fun, colourful and lively part and I can't wait to see where it goes!" Speaking of AJ's arrival, Ganatra said that he felt "very confident, happy and excited about having a new character to play against", especially a new member of the family, "because the Masoods are always about family." AJ first appears in the episode originally broadcast in the UK on 9 July 2012, which is EastEnders' 4458th episode.
AJ is a mechanic, who is described as a chancer who "never misses an opportunity for excitement." He is characterised as a free-spirited, fun-loving and carefree rebel, who does not always realise how his spontaneity affects other people. He is described as cheeky, irresponsible, a bad influence, a joker, a charmer and a talker. It is said that he does not plan or do what people expect of him, is fun to be around and could be running away from life. A writer for the BBC said that he lives "like there's no tomorrow", and makes decisions based on the results of a coin flip. The coin, described as "lucky", is inspired by the Bollywood film Sholay, in which two friends make decisions based on the flip of a coin, though one friend does not know that both sides of the coin are the same. Ganatra stated in an interview on This Morning that he did not think that the two sides of AJ's coin were the same. Sharma described AJ as "the clown who loves to play" and "a little bit of a hippy", saying "he's got a real wheeler-dealer, Del Boy aspect to his character." He has twice compared AJ to a puppy dog, because he is nice but annoying, and he is fun but a nuisance. Sharma, who was brought up in Newport, said that "the charm, humour and personality" of Welsh people he knew helped him to create the character of AJ.
Laura Morgan from All About Soap called AJ "mischievous", and the magazine also called him "bothersome" and "crazy". Nathan Bevan from Western Mail has called him "gregarious", an "aggro-magnet", a "trouble-magnet", "wise-cracking" and "wheeler-dealing". He has also been called "flighty", a "tearaway", "naughty" and "good-for-nothing".
AJ is a member of the Pakistani Masood family, headed by Masood Ahmed, played by Ganatra. Masood is married to Wadia's character, Zainab Masood (though at the time of AJ's arrival they are divorced and planning to remarry), and they live with their children Syed Masood (Elliott), Tamwar Masood (Himesh Patel) and Kamil Masood (Arian Chikhlia). Masood and AJ also have an older brother, Inzamam Ahmed (Paul Bhattacharjee). AJ is younger than Masood. AJ has been called "the black sheep" of the family and "a delinquent uncle".
AJ and Masood had lost touch for three years prior to AJ's arrival, and had fallen out because of an argument between Zainab and AJ's wife Aliyah, said to be that Aliyah once made an obscene comment to her. AJ was described as "the polar opposite to his control freak sister-in-law [Zainab]", and it was said that "sparks [would] fly in the Masood household as the battle lines are drawn [between them]." Zainab thinks AJ is reckless and she has little time for him. Ganatra said that there is tension between AJ and Zainab, and although Zainab does not necessarily dislike AJ, she does not like that AJ gets Masood into trouble, and Zainab's hatred for Aliyah does not help. Inside Soap called Zainab AJ's archrival and Jaci Stephen from the Daily Mail said AJ's arrival was "Something else not to put a smile on Zainab's face" though made it an "exciting week" for Masood.
AJ brings out a different side to Masood, which Ganatra said could "upset the status quo". He said that AJ was brought in "to stir up Masood's life, and that has exciting prospects", and they would "get up to all sorts of shenanigans." Presenter Kate Thornton, when interviewing Ganatra, said AJ was a "playmate" for Masood, while Wadia said that AJ brings the comedy back to Masood. Inside Soap's Kate White called AJ "a world away from family man Masood", while Soaplife said AJ is "not a good influence but he sure puts a smile on [Masood's] face and a new spring in his step." Daniel Kilkelly from Digital Spy said that AJ's influence on Masood is "infectious". AJ's arrival allows people to see what Masood was like before he married Zainab, as all that was known about him to that point was his life with her. Ganatra stated: "So by opening this door, you get to see what Masood was like in his childhood and as a teenager. Masood did have a naughty streak—he was in a band with his brother, and they got up to mischief. Masood [...] has been put on the straight and narrow [since]. But prior to that, he was a teenager like any other—getting into trouble, and that was in cahoots with his brother AJ!" Ganatra said that, as British Asians, Masood and AJ grew up going to clubs and getting into trouble with girls. Now, Masood sees AJ as somebody with "no responsibilities, no children and no stress of having to provide for a family" and as AJ suffers marrital problems, is feeling lonely and has no children, Ganatra said "they want each other's lives, which is quite a nice dynamic to play." He added that "AJ would love the stability of a family life like Masood's, while Masood would love to pack his bags, get drunk and perhaps end up in a stranger's bed. I'm interested to see him bring out Masood's naughty streak—and where that could take them..." AJ is accepting of Syed's homosexuality and his relationship with Christian Clarke (John Partridge).
Sharma said that AJ would be an "unlikely saviour" for the Masood family when they find themselves in financial trouble. Although he called AJ the "family rebel", he said that the character is "doing what he can to help out with the money problems [because] when the going gets tough, AJ will step in to help his loved ones—and while he will probably never take the conventional route, he'll always get something sorted out in the end." He gets a job, and then helps to lift the family's spirits by organising a fireworks display, on which Sharma said, "AJ is just trying to help out his family in his own, dysfunctional way." In November 2012, Zainab makes a promise never to interfere in people's lives, so AJ decides to use the opportunity to test her. Sharma explained: "He is ready to test her promise to the limits! AJ knows exactly how to push all of Zainab's buttons, and now he's going to take full advantage of the fact that she won't let herself be the control freak she normally likes to be!" Jane Simon from the Daily Mirror said AJ is "thoroughly enjoying" testing Zainab's new policy.
In AJ's first episode, he makes an enemy of Derek Branning when he and Masood crash a shopping trolley into his car. An insider said that AJ should be worried, explaining: "AJ is a bit of a talker and tries to blag his way out of the situation but that just makes things even worse. Derek is quick to rough him up a little to make him realise he's not to be messed with. The confrontation really shocks AJ but he's not going to be pushed around by some bullying bloke he's just met." The Daily Star said that "Derek is the one person AJ really shouldn't make into an enemy", while interviewer Phillip Schofield stated: "If you knock the wing mirror off Derek's Jag you are in for trouble."
On 11 September 2012, it was reported that AJ would seduce Roxy Mitchell and they would spend the night together in Masood and Zainab's house after an evening of drinking. At the time, it was unknown if it would be a one-off or if a longer relationship would start. An insider from EastEnders told Inside Soap that Roxy and AJ are both looking for fun and they "hit it off" because she loves "a man who can make her laugh and AJ definitely ticks that box." They added that they have "great chemistry" but said that as Roxy is sidetracked by another man, "AJ will have to fight for her affections" if he wants her. An insider also told the Daily Star that the two "can't keep their hands off each other" and "Roxy is more than up for it." They added that "Zainab would go mental if she knew what they were up to under her roof and it remains to be seen whether they can get away with it. Roxy is the last person who Zainab would want AJ to hook up with. [...] Even Masood could not defend his brother this time as he had been pretty disrespectful." Digital Spy also noted chemistry between AJ and Roxy, saying they "clearly enjoy each other's company". Tony Stewart from the Daily Mirror said the relationship between Roxy and AJ is "played for laughs", contrasting with Roxy's relationship with Michael Moon (Steve John Shepherd).
Inside Soap expected AJ to be paired up with Denise Fox (Diane Parish), but actor Ricky Norwood, who plays Fatboy, spoke about his character's rivalry with AJ over her in an interview with the magazine. He said, "There's a little bit of rivalry building up between [them]. Fatboy can tell that AJ likes Denise. But at [a party], AJ puts a [song] on for Denise, and it's just totally wrong. [...] Fatboy takes over and [...] it gets a big response." Inside Soap said that AJ does not know what makes Denise tick, while Sharma said "Denise isn't a big fan of AJ at the moment!" In 2013, Inside Soap said they expected to see AJ paired with Bianca Jackson (Patsy Palmer), saying, "He's been trying his luck for some time, and surely there's only so long Bianca can fend off AJ. If nothing else, he'd be lots of fun around her kids, as AJ isn't the most mature fella in Albert Square." Vicky Prior from the Metro also hoped to see AJ find romance with Bianca.
On 24 September 2013, it was announced that AJ, along with three other characters—Kirsty Branning (Kierston Wareing), Poppy Meadow (Rachel Bright) and Carl White (Daniel Coonan)—had been axed from the series by the new executive producer Dominic Treadwell-Collins. It was reported that Treadwell-Collins was "determined to get EastEnders back to its best" and a spokesperson confirmed the departures. Reports said that it was hoped the move would increase ratings, and a show source added that "[Treadwell-Collins] didn't feel the characters who are leaving fit with the direction he is taking the show so he quickly decided to write them out. He has only been in a month but he is already making big changes. He knows what he wants for EastEnders and is putting plans in place quickly." Sharma filmed his final scenes before Christmas 2013 and the character's final appearance was on 10 January 2014.
Upon AJ's arrival, Ally Ross of The Sun said: "New arrivals have included [...] Masood's supposedly funny and long-lost brother AJ, who made the fatal mistake of arriving with the line: 'Do I look like a comedian?' No. You look like David Baddiel. Now kindly piss off". Kay Ribeiro from Heat said, "We like new boy AJ. Not only is he a laugh [...] but he's providing light relief during [Masood] and [Zainab]'s split, which is making us sad." Laura Morgan from All About Soap hoped that AJ would become a permanent character after his initial appearances. In October 2012, Allison Jones from Inside Soap said, "AJ has proved the perfect tonic for a family almost constantly dogged with crisis [and] his tenacious ability to wind up Zainab never fails to entertain! AJ may have only been in Walford for a few months, but it already feels as if we've known him for ages." She also called Sharma and Ganatra, "a killer on-screen pairing". Nathan Bevan from Welsh newspaper Western Mail praised Sharma's role in EastEnders, naming him as one of "50 things you should look forward to in Wales" in 2013, saying, "Anyone who injects a little sunshine into the 'Chekhov with a covered market' drudgery of EastEnders should be automatically given an Outstanding Contribution to Broadcasting Award in our book. So well done Newport's very own Phaldut Sharma who, since arriving in Walford as Masood Ahmed's gregarious but aggro-magnet brother AJ, has helped break up the unrelenting, bicker-filled misery of Albert Square." Bevan later said that Sharma has "shaken up the residents of Walford as the wise-cracking, wheeler-dealing AJ Ahmed", adding, "He's the gregarious, trouble-magnet who's brought some much needed sunshine to the sombre, squabble-filled soapiness of Albert Square." Anthony D. Langford from AfterElton.com said AJ was a "find" but thought the writers might not be sure what to do with the character. Vicky Prior from the Metro said AJ "has lit up the square with his gently laddish behaviour."
After AJ and Derek fight in August 2012, Emma Roberts from MSN Entertainment said it was one of the best fights of 2012, scoring it 5 out of 5 and saying, "This is how soap fights should always be done! It was like Walford turned into the wild west." A writer from MSN TV said that AJ's drunken kiss with Roxy was one of EastEnders' 20 worst storylines of 2012, asked if it was serious and said that it was only made a "little bit believable" because they were both drunk. In the episode broadcast on 2 November 2012, AJ helps his family stand up to Danny Pennant (Gary Lucy). Claire Crick from All About Soap called AJ the "highlight" of the episode, saying, "we never thought we'd say this, but he's really quite funny! We loved how he rallied the family together to stand up to Danny". AJ, who undertakes self-defence classes in a storyline, was used as an example by a spokesperson for the show when EastEnders and other British soap operas were criticised in a study of 830 scenes over two weeks, made by Liverpool John Moores University Business School, who said that exercise was only shown or mentioned on four occasions.
Sharma received two award nominations for his role of AJ: a British Soap Award for Sexiest Male, and an Inside Soap Award for Funniest Male, both in 2013. He was not shortlisted for either award. After his departure was announced, James Lowe from All About Soap opined that he, and the other three characters cut from the show at the same time, were "the right people to go". Yahoo! TV UK said they were "a little bit disappointed" about AJ's departure, because he "has been good value."