CCM's ideology and publicity secretary, Humphrey Polepole, said the candidates were appointed by the party's central committee, which is chaired by President John Magufuli.
"After a thorough assessment, the central committee ... nominated Dr Godwin Mollel as the candidate for Siha constituency in Kilimanjaro Region and Maulid Mtulia as the candidate for Dar es Salaam's Kinondoni constituency," Polepole said in a statement.
Dar es Salaam and Kilimanjaro emerged as some of the staunchest opposition strongholds in the 2015 general election, where opposition parties won many parliamentary seats.
However, there has since been a wave of defections of MPs and councilors from the two opposition stronghold regions and elsewhere to CCM in recent months, sparking concern among opposition leaders.
Mtulia resigned as the MP for Kinondoni and member of the Civic United Front (CUF) on December 2 last year.
Less than two weeks later, Dr Mollel followed suit by ditching Chama Cha Demokrasia na Maaendeleo (CHADEMA) and resigning from his post as Siha MP to join CCM.
Both lawmakers said they were resigning from the opposition parties because they were impressed by President Magufuli's leadership.
The National Electoral Commission (NEC) announced earlier this week that parliamentary by-elections in Siha and Kinondoni constituencies will be held on February 17 this year.
CCM is virtually guaranteed of winning the parliamentary by-elections after the main opposition parties - CHADEMA, CUF and ACT-Wazalendo - said they will boycott the polls. Smaller opposition parties will take part in the elections.
The main opposition parties said they will not take part in the parliamentary by-elections due to allegations of foul play in recently-held local government polls, where CCM won 42 out of 43 council elections.
The ongoing wave of defections of politicians kicked off in earnest in October last year when Singida North MP Lazaro Nyalandu quit CCM to join CHADEMA, citing concerns about democracy and human rights abuses in the country.
Nyalandu, who once served as natural resources and tourism minister, was Member of Parliament for the ruling party for 17 years before joining the opposition.
Since his resignation, the wave of defections has largely gone in favour of CCM, with dozens of opposition politicians defecting to the ruling party.