He kept a black book of all the girls he had dated in the past in his desk.
Is "in his desk" a misplaced modifier, or is the sentence grammatically correct? Kindly elaborate.
As in many sentences, there is ambiguity about the syntactic role of the prepositional phrase at the end, but one of the grammatical parses of the sentence does have the intended meaning.
See my answer to Does "I am eating vegan cheese in my underpants" really imply that the vegan cheese is inside my underpants? for references that explain that ambiguity does not make a sentence ungrammatical, and that, as a general rule, it is grammatical for an adverbial adjunct to a verb to occur directly after the object of the verb. (Actually, I’m not sure if the PP “in his desk” is an adjunct or a complement in this sentence. Some of the tests listed on this page seem to maybe suggest that it is a complement. But in any case, I don’t think this would make a difference to the grammaticality of this word order.)
The quoted sentence can be parsed as
He [kept [a black book of all the girls he had dated in the past](direct object) [in his desk](prepositional phrase)](verb phrase)