[subject] + 莫非 + [predicate]?
莫非 + [clause]?
莫非 + [clause] + 不成?
莫非 puts forward a guess the speaker is starting to believe: "could it be that…?", "don't tell me…". It goes at the start of the sentence or before the predicate, and the sentence is a question. It's literary in origin, and in speech it adds a note of wonder or suspicion.
不成 at the end makes the guess sound more incredulous.
难道 is mainly rhetorical: the speaker thinks the answer is no and is protesting. 莫非 leans the other way – the speaker suspects the answer is yes and is checking.
莫非 can be rhetorical too, but a real guess is its usual job.
无非 – "nothing more than" – looks and sounds similar, and learners swap them. 无非 states; 莫非 guesses.