The decision was announced in London on Friday by the Chancellor of the High Court, Sir Geoffrey Vos.
Brady, who used the name Ian Stewart-Brady, died aged 79 on May 15 this year but his remains have not yet been disposed of.
Sir Geoffrey had been asked by two local authorities to make decisions relating to the disposal of the serial killer's body so that it can be "lawfully and decently disposed of without further delay".
Brady and Myra Hindley, who died in prison in 2002, tortured and murdered five children in the 1960s. Four of the victims were buried on Saddleworth Moor in the south Pennines.
The judge said Oldham Metropolitan Borough Council and Tameside Metropolitan Borough Council were concerned that, five months after Brady's death, his executor, solicitor Robin Makin, had failed to make proper arrangements for the disposal.
"I am satisfied also that it is both necessary and expedient for the matter to be taken out of Mr Makin's hands if the deceased's body is to be disposed of quickly, lawfully and decently.
"Even after a hearing that has lasted for one and a half days, the parties have not been able to agree precisely how the deceased's body should be disposed of.
"Section 116 of the Senior Courts Act 1981 and the court's inherent jurisdiction over estates allows it in this case to give directions as to who should dispose of the deceased body, and as to how it should be disposed of."
He added: "I decline to permit the playing of the fifth movement of the Symphony Fantastique at the cremation as Mr Makin requested.
"As the composer's programme notes describe, the theme and subject of the piece means legitimate offence would be caused to the families of the deceased's victims once it became known it had been played.
"It was not suggested by Mr Makin that the deceased had requested any other music to be played or any other ceremony to be performed, and in those circumstances, I propose to direct that there be no music and no ceremony."
In his ruling, the judge said: " As to the playing of the fifth movement of the Symphony during the cremation, I need only quote the description of that movement from Wikipedia for it to be seen how inappropriate it would be:
"'Fifth movement: "Songe d'une nuit du sabbat" (Dream of the Night of the Sabbath): In both the program notes, Berlioz wrote:
"'[The musician] sees himself at a witches' sabbath, in the midst of a hideous gathering of shades, sorcerers and monsters of every kind who have come together for his funeral.
"'Strange sounds, groans, outbursts of laughter; distant shouts which seem to be answered by more shouts.
"'The beloved melody appears once more, but has now lost its noble and shy character; it is now no more than a vulgar dance tune, trivial and grotesque: it is she who is coming to the sabbath ... Roar of delight at her arrival ... She joins the diabolical orgy ...
"'The funeral knell tolls, burlesque parody of the Dies irae, the dance of the witches ...'.
"I have no difficulty in understanding how legitimate offence would be caused to the families of the deceased's victims once it became known that this movement had been played at his cremation. I decline to permit it."
The judge said: " Taking into account all the competing positions, the overwhelming factor in this case is the public interest.
"The deceased's wishes are relevant, but they do not outweigh the need to avoid justified public indignation and actual unrest. It was not doubted that Mr Makin could be trusted.
"The claimants were right to seek to ensure that there is a lawful and decent disposal of the deceased's body without causing justified public indignation or unrest.
"Mr Makin has not been justified in being so secretive about how he was intending to dispose of the deceased's body.
"Had he discussed the matter openly with the claimants and with Sefton Borough Council and given clear undertakings that he was not intending to scatter the deceased's ashes in their areas, these proceedings might have been avoided.
"Even now, he has refused to say what he intends to do with the ashes if he is allowed custody of them.
"Mr Makin cannot, therefore, be entrusted with the ashes for disposal.
"Even if I were to limit him to private ground, against his wishes, that ground might be somewhere where public access was possible.
"Although he said he only intended to tell one other (unidentified) person how he would dispose of the ashes there remains the possibility that his plans would be discovered, and there could be public disorder if a member of the public sought to stop Mr Makin doing what he wanted to do with the ashes.
"It is unfortunate that Sefton Council is no longer able to arrange their disposal, but instead an officer of Tameside Metropolitan Borough Council has said that she will do so, and I am satisfied that that this is the best proposal available."
In the public redacted version of his judgment, the judge concluded: "I will therefore direct under Section 116 that (REDACTED) shall be appointed as administrator of the estate of the deceased for the limited purpose of disposing of the body of the deceased in the following manner.
"I also direct under the inherent jurisdiction of the court and under Section 116 that (REDACTED) as administrator shall be responsible for ensuring that the body of the deceased is disposed of in the following manner: (REDACTED)."